mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -8,14 +8,15 @@
|
|||
|
||||
#include "zeek/Reporter.h"
|
||||
|
||||
namespace zeek::detail {
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
EVP_MD_CTX* hash_init(HashAlgorithm alg)
|
||||
{
|
||||
EVP_MD_CTX* c = EVP_MD_CTX_new();
|
||||
const EVP_MD* md;
|
||||
|
||||
switch (alg)
|
||||
switch ( alg )
|
||||
{
|
||||
case Hash_MD5:
|
||||
#ifdef EVP_MD_CTX_FLAG_NON_FIPS_ALLOW
|
||||
|
@ -68,7 +69,8 @@ unsigned char* internal_md5(const unsigned char* data, unsigned long len, unsign
|
|||
return calculate_digest(Hash_MD5, data, len, out);
|
||||
}
|
||||
|
||||
unsigned char* calculate_digest(HashAlgorithm alg, const unsigned char* data, uint64_t len, unsigned char* out)
|
||||
unsigned char* calculate_digest(HashAlgorithm alg, const unsigned char* data, uint64_t len,
|
||||
unsigned char* out)
|
||||
{
|
||||
// maximum possible length for supported hashes
|
||||
static unsigned char static_out[SHA512_DIGEST_LENGTH];
|
||||
|
@ -82,4 +84,4 @@ unsigned char* calculate_digest(HashAlgorithm alg, const unsigned char* data, ui
|
|||
return out;
|
||||
}
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue