dcrypt_params/utils/
hash.rs

1//! Constants for hash functions
2
3/// Output size of SHA-224 in bytes
4pub const SHA224_OUTPUT_SIZE: usize = 28;
5
6/// Output size of SHA-256 in bytes
7pub const SHA256_OUTPUT_SIZE: usize = 32;
8
9/// Output size of SHA-384 in bytes
10pub const SHA384_OUTPUT_SIZE: usize = 48;
11
12/// Output size of SHA-512 in bytes
13pub const SHA512_OUTPUT_SIZE: usize = 64;
14
15/// Output size of SHA3-224 in bytes
16pub const SHA3_224_OUTPUT_SIZE: usize = 28;
17
18/// Output size of SHA3-256 in bytes
19pub const SHA3_256_OUTPUT_SIZE: usize = 32;
20
21/// Output size of SHA3-384 in bytes
22pub const SHA3_384_OUTPUT_SIZE: usize = 48;
23
24/// Output size of SHA3-512 in bytes
25pub const SHA3_512_OUTPUT_SIZE: usize = 64;
26
27/// Output size of Keccak-256 in bytes
28pub const KECCAK256_OUTPUT_SIZE: usize = 32;
29
30/// Internal block size of SHA-256 in bytes
31pub const SHA256_BLOCK_SIZE: usize = 64;
32
33/// Internal block size of SHA-512 in bytes
34pub const SHA512_BLOCK_SIZE: usize = 128;
35
36/// Internal block size of SHA3-256 in bytes
37pub const SHA3_256_BLOCK_SIZE: usize = 136;
38
39/// Internal block size of SHA3-512 in bytes
40pub const SHA3_512_BLOCK_SIZE: usize = 72;
41
42/// Internal block size of Keccak-256 in bytes
43pub const KECCAK256_BLOCK_SIZE: usize = 136;