Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

sha2cc.h
Go to the documentation of this file.
1 #define COMMON_DIGEST_FOR_OPENSSL 1
2 #include <CommonCrypto/CommonDigest.h>
3
4 #define SHA256_BLOCK_LENGTH CC_SHA256_BLOCK_BYTES
5 #define SHA384_BLOCK_LENGTH CC_SHA384_BLOCK_BYTES
6 #define SHA512_BLOCK_LENGTH CC_SHA512_BLOCK_BYTES
7
8 #define SHA384_CTX CC_SHA512_CTX
9
10 static DEFINE_UPDATE_FUNC_FOR_UINT(SHA256)
11 static DEFINE_FINISH_FUNC_FROM_FINAL(SHA256)
12 static DEFINE_UPDATE_FUNC_FOR_UINT(SHA384)
13 static DEFINE_FINISH_FUNC_FROM_FINAL(SHA384)
14 static DEFINE_UPDATE_FUNC_FOR_UINT(SHA512)
15 static DEFINE_FINISH_FUNC_FROM_FINAL(SHA512)
16
17
18 #undef SHA256_Update
19 #undef SHA256_Finish
20 #define SHA256_Update rb_digest_SHA256_update
21 #define SHA256_Finish rb_digest_SHA256_finish
22
23 #undef SHA384_Update
24 #undef SHA384_Finish
25 #define SHA384_Update rb_digest_SHA384_update
26 #define SHA384_Finish rb_digest_SHA384_finish
27
28 #undef SHA512_Update
29 #undef SHA512_Finish
30 #define SHA512_Update rb_digest_SHA512_update
31 #define SHA512_Finish rb_digest_SHA512_finish
DEFINE_FINISH_FUNC_FROM_FINAL
#define DEFINE_FINISH_FUNC_FROM_FINAL(name)
Definition: digest.h:46
DEFINE_UPDATE_FUNC_FOR_UINT
#define DEFINE_UPDATE_FUNC_FOR_UINT(name)
Definition: digest.h:34