Software /
code /
prosody
Comparison
util-src/hashes.c @ 12566:91e5cb295ba3
util.hashes: Remove unused struct
Unused since 9f1c5ae8d70b
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 24 Jun 2022 16:12:11 +0200 |
parent | 12565:2e0c7f5cd8f8 |
child | 12567:96871ee6e26c |
comparison
equal
deleted
inserted
replaced
12565:2e0c7f5cd8f8 | 12566:91e5cb295ba3 |
---|---|
126 } | 126 } |
127 | 127 |
128 static int Lsha3_512(lua_State *L) { | 128 static int Lsha3_512(lua_State *L) { |
129 return Levp_hash(L, EVP_sha3_512()); | 129 return Levp_hash(L, EVP_sha3_512()); |
130 } | 130 } |
131 | |
132 struct hash_desc { | |
133 int (*Init)(void *); | |
134 int (*Update)(void *, const void *, size_t); | |
135 int (*Final)(unsigned char *, void *); | |
136 size_t digestLength; | |
137 void *ctx, *ctxo; | |
138 }; | |
139 | 131 |
140 static int Levp_hmac(lua_State *L, const EVP_MD *evp) { | 132 static int Levp_hmac(lua_State *L, const EVP_MD *evp) { |
141 unsigned char hash[EVP_MAX_MD_SIZE], result[EVP_MAX_MD_SIZE * 2]; | 133 unsigned char hash[EVP_MAX_MD_SIZE], result[EVP_MAX_MD_SIZE * 2]; |
142 size_t key_len, msg_len; | 134 size_t key_len, msg_len; |
143 size_t out_len = EVP_MAX_MD_SIZE; | 135 size_t out_len = EVP_MAX_MD_SIZE; |