More standard memset_s
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "blf.h"
|
||||
#include "blowfish.h"
|
||||
#include "mpw-util.h"
|
||||
|
||||
/* This implementation is adaptable to current computing power.
|
||||
* You can have up to 2^31 rounds which should be enough for some
|
||||
@@ -186,10 +187,10 @@ bcrypt_hashpass(const char *key, const uint8_t *salt, char *encrypted,
|
||||
snprintf( encrypted, 8, "$2%c$%2.2u$", minor, logr );
|
||||
encode_base64( encrypted + 7, csalt, BCRYPT_MAXSALT );
|
||||
encode_base64( encrypted + 7 + 22, ciphertext, 4 * BCRYPT_WORDS - 1 );
|
||||
memset_s( &state, sizeof state, 0, sizeof state );
|
||||
memset_s( ciphertext, sizeof ciphertext, 0, sizeof ciphertext );
|
||||
memset_s( csalt, sizeof csalt, 0, sizeof csalt );
|
||||
memset_s( cdata, sizeof cdata, 0, sizeof cdata );
|
||||
mpw_zero( &state, sizeof state );
|
||||
mpw_zero( ciphertext, sizeof ciphertext );
|
||||
mpw_zero( csalt, sizeof csalt );
|
||||
mpw_zero( cdata, sizeof cdata );
|
||||
return 0;
|
||||
|
||||
inval:
|
||||
|
||||
Reference in New Issue
Block a user