summaryrefslogtreecommitdiff
path: root/openbsd-compat/bcrypt_pbkdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bcrypt_pbkdf.c')
-rw-r--r--openbsd-compat/bcrypt_pbkdf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsd-compat/bcrypt_pbkdf.c b/openbsd-compat/bcrypt_pbkdf.c
index 785234563..62728d38f 100644
--- a/openbsd-compat/bcrypt_pbkdf.c
+++ b/openbsd-compat/bcrypt_pbkdf.c
@@ -15,6 +15,8 @@
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */ 16 */
17 17
18/* OPENBSD ORIGINAL: lib/libutil/bcrypt_pbkdf.c */
19
18#include "includes.h" 20#include "includes.h"
19 21
20#ifndef HAVE_BCRYPT_PBKDF 22#ifndef HAVE_BCRYPT_PBKDF
@@ -91,7 +93,7 @@ bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, u_int8_t *out)
91 cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), 93 cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext),
92 &j); 94 &j);
93 for (i = 0; i < 64; i++) 95 for (i = 0; i < 64; i++)
94 blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t)); 96 blf_enc(&state, cdata, sizeof(cdata) / (sizeof(uint64_t)));
95 97
96 /* copy out */ 98 /* copy out */
97 for (i = 0; i < BCRYPT_WORDS; i++) { 99 for (i = 0; i < BCRYPT_WORDS; i++) {