📄 hmac_sha1.c
字号:
#include <linux/types.h>#include <linux/string.h>#include "hmac_generic.h"#include "sha.h"#include "hmac_sha1.h"#if 0#define SHA1_Final SHA1Final#define SHA1_Init SHA1Init#define SHA1_Update SHA1Update#endifvoid inline sha1_result(SHA1_CTX *ctx, __u8 * hash, int hashlen) { if (hashlen==SHA1_HASHLEN) SHA1_Final(hash, ctx); else { __u8 hash_buf[SHA1_HASHLEN]; SHA1_Final(hash_buf, ctx); memcpy(hash, hash_buf, hashlen); }}HMAC_SET_KEY_IMPL (sha1_hmac_set_key, sha1_hmac_context, SHA1_BLOCKSIZE, SHA1_Init, SHA1_Update)HMAC_HASH_IMPL (sha1_hmac_hash, sha1_hmac_context, SHA1_CTX, SHA1_HASHLEN, SHA1_Update, sha1_result)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -