mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-12 00:43:38 +08:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
/*
|
||||
* Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/**
|
||||
* The Whirlpool hashing function.
|
||||
*
|
||||
@@ -48,14 +57,14 @@
|
||||
*
|
||||
* Unlike authors' reference implementation, block processing
|
||||
* routine whirlpool_block is designed to operate on multi-block
|
||||
* input. This is done for perfomance.
|
||||
* input. This is done for performance.
|
||||
*/
|
||||
|
||||
#include "wp_locl.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include "wp_locl.h"
|
||||
#include <string.h>
|
||||
|
||||
fips_md_init(WHIRLPOOL)
|
||||
int WHIRLPOOL_Init(WHIRLPOOL_CTX *c)
|
||||
{
|
||||
memset(c, 0, sizeof(*c));
|
||||
return (1);
|
||||
@@ -237,7 +246,7 @@ int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c)
|
||||
|
||||
if (md) {
|
||||
memcpy(md, c->H.c, WHIRLPOOL_DIGEST_LENGTH);
|
||||
memset(c, 0, sizeof(*c));
|
||||
OPENSSL_cleanse(c, sizeof(*c));
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user