Lines Matching refs:HASH
92 /* Generic MAC envelop macros. Substitute HASH with MD5, SHA1, & SHA2 mechs */
94 #define SOFT_MAC_INIT_CTX(HASH, mac_ctx, ipad, opad, len) \
95 /* Perform HASH on ipad */ \
96 HASH##Init(&((mac_ctx)->hc_icontext)); \
97 HASH##Update(&((mac_ctx)->hc_icontext), (ipad), (len)); \
98 /* Perform HASH on opad */ \
99 HASH##Init(&((mac_ctx)->hc_ocontext)); \
100 HASH##Update(&((mac_ctx)->hc_ocontext), (opad), (len));
102 #define SOFT_MAC_UPDATE(HASH, mac_ctx, pPart, PartLen) \
103 HASH##Update(&((mac_ctx)->hc_icontext), (pPart), (PartLen));
105 #define SOFT_MAC_FINAL(HASH, mac_ctx, mac) \
106 HASH##Final((mac), &((mac_ctx)->hc_icontext)); \
107 HASH##Update(&((mac_ctx)->hc_ocontext), (mac), HASH##_DIGEST_LENGTH);\
108 HASH##Final((mac), &((mac_ctx)->hc_ocontext));