mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Add SHA1 and SHA256 hashing BIFs. (addresses #542)
Also refactor all internal MD5 stuff to use OpenSSL's.
This commit is contained in:
parent
8766a2e2fc
commit
79afc834ce
19 changed files with 461 additions and 531 deletions
|
@ -18,6 +18,8 @@ extern "C" {
|
|||
}
|
||||
#endif
|
||||
|
||||
#include <openssl/md5.h>
|
||||
|
||||
extern "C" void OPENSSL_add_all_algorithms_conf(void);
|
||||
|
||||
#include "bsd-getopt-long.h"
|
||||
|
@ -570,8 +572,7 @@ int main(int argc, char** argv)
|
|||
break;
|
||||
|
||||
case 'K':
|
||||
hash_md5(strlen(optarg), (const u_char*) optarg,
|
||||
shared_hmac_md5_key);
|
||||
MD5((const u_char*) optarg, strlen(optarg), shared_hmac_md5_key);
|
||||
hmac_key_set = 1;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue