@@ -78,23 +78,23 @@ static int _bcrypt_pbkdf_hash(const unsigned char *pass, unsigned long passlen,
7878 @param outlen [in/out] The desired size of the algorithm output
7979 @return CRYPT_OK if successful
8080*/
81- int bcrypt_pbkdf_openbsd (const char * password , unsigned long password_len ,
82- const unsigned char * salt , unsigned long salt_len ,
83- unsigned int rounds , int hash_idx ,
84- unsigned char * out , unsigned long * outlen )
81+ int bcrypt_pbkdf_openbsd (const void * secret , unsigned long secret_len ,
82+ const unsigned char * salt , unsigned long salt_len ,
83+ unsigned int rounds , int hash_idx ,
84+ unsigned char * out , unsigned long * outlen )
8585{
8686 int err ;
8787 ulong32 blkno ;
8888 unsigned long left , itts , x , y , hashed_pass_len , step_size , steps , dest , used_rounds ;
8989 unsigned char * buf [3 ], blkbuf [4 ];
9090 unsigned char * hashed_pass ;
9191
92- LTC_ARGCHK (password != NULL );
93- LTC_ARGCHK (salt != NULL );
94- LTC_ARGCHK (out != NULL );
95- LTC_ARGCHK (outlen != NULL );
92+ LTC_ARGCHK (secret != NULL );
93+ LTC_ARGCHK (salt != NULL );
94+ LTC_ARGCHK (out != NULL );
95+ LTC_ARGCHK (outlen != NULL );
9696
97- if ((password_len == 0 ) || (salt_len == 0 ) || (* outlen == 0 )) {
97+ if ((secret_len == 0 ) || (salt_len == 0 ) || (* outlen == 0 )) {
9898 return CRYPT_INVALID_ARG ;
9999 }
100100 /* test hash IDX */
@@ -127,7 +127,7 @@ int bcrypt_pbkdf_openbsd(const char *password, unsigned long password_l
127127 steps = (* outlen + step_size - 1 ) / step_size ;
128128
129129 hashed_pass_len = MAXBLOCKSIZE ;
130- if ((err = hash_memory (hash_idx , (unsigned char * )password , password_len , hashed_pass , & hashed_pass_len )) != CRYPT_OK ) {
130+ if ((err = hash_memory (hash_idx , (unsigned char * )secret , secret_len , hashed_pass , & hashed_pass_len )) != CRYPT_OK ) {
131131 goto LBL_ERR ;
132132 }
133133
0 commit comments