|
@ -1,4 +1,4 @@ |
|
|
/* $OpenBSD: bcrypt_pbkdf.c,v 1.5 2013/12/22 03:29:07 tedu Exp $ */ |
|
|
|
|
|
|
|
|
/* $OpenBSD: bcrypt_pbkdf.c,v 1.6 2014/01/31 16:56:32 tedu Exp $ */ |
|
|
/* |
|
|
/* |
|
|
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> |
|
|
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> |
|
|
* |
|
|
* |
|
@ -87,9 +87,9 @@ bcrypt_hash(uint8_t *sha2pass, uint8_t *sha2salt, uint8_t *out) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* zap */ |
|
|
/* zap */ |
|
|
memset(ciphertext, 0, sizeof(ciphertext)); |
|
|
|
|
|
memset(cdata, 0, sizeof(cdata)); |
|
|
|
|
|
memset(&state, 0, sizeof(state)); |
|
|
|
|
|
|
|
|
explicit_bzero(ciphertext, sizeof(ciphertext)); |
|
|
|
|
|
explicit_bzero(cdata, sizeof(cdata)); |
|
|
|
|
|
explicit_bzero(&state, sizeof(state)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int |
|
|
int |
|
@ -155,8 +155,8 @@ bcrypt_pbkdf(const char *pass, size_t passlen, const uint8_t *salt, size_t saltl |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* zap */ |
|
|
/* zap */ |
|
|
memset(&ctx, 0, sizeof(ctx)); |
|
|
|
|
|
memset(out, 0, sizeof(out)); |
|
|
|
|
|
|
|
|
explicit_bzero(&ctx, sizeof(ctx)); |
|
|
|
|
|
explicit_bzero(out, sizeof(out)); |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |