Update copyright for 2022
[pgsql.git] / src / include / common / sha2.h
blobfe248e9863a67954ced2127e1aa0734ce7d9ecd7
1 /*-------------------------------------------------------------------------
3 * sha2.h
4 * Constants related to SHA224, 256, 384 AND 512.
6 * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * IDENTIFICATION
10 * src/include/common/sha2.h
12 *-------------------------------------------------------------------------
15 #ifndef _PG_SHA2_H_
16 #define _PG_SHA2_H_
18 /*** SHA224/256/384/512 Various Length Definitions ***********************/
19 #define PG_SHA224_BLOCK_LENGTH 64
20 #define PG_SHA224_DIGEST_LENGTH 28
21 #define PG_SHA224_DIGEST_STRING_LENGTH (PG_SHA224_DIGEST_LENGTH * 2 + 1)
22 #define PG_SHA256_BLOCK_LENGTH 64
23 #define PG_SHA256_DIGEST_LENGTH 32
24 #define PG_SHA256_DIGEST_STRING_LENGTH (PG_SHA256_DIGEST_LENGTH * 2 + 1)
25 #define PG_SHA384_BLOCK_LENGTH 128
26 #define PG_SHA384_DIGEST_LENGTH 48
27 #define PG_SHA384_DIGEST_STRING_LENGTH (PG_SHA384_DIGEST_LENGTH * 2 + 1)
28 #define PG_SHA512_BLOCK_LENGTH 128
29 #define PG_SHA512_DIGEST_LENGTH 64
30 #define PG_SHA512_DIGEST_STRING_LENGTH (PG_SHA512_DIGEST_LENGTH * 2 + 1)
32 #endif /* _PG_SHA2_H_ */