@@ -199,7 +199,6 @@ _bcrypt_derive_key_pbkdf2 (mongoc_crypto_t *crypto,
199
199
const uint8_t * salt ,
200
200
size_t salt_len ,
201
201
uint32_t iterations ,
202
- size_t output_len ,
203
202
unsigned char * output )
204
203
{
205
204
uint8_t intermediate_digest [MONGOC_SCRAM_HASH_MAX_SIZE ];
@@ -236,8 +235,13 @@ mongoc_crypto_cng_pbkdf2_hmac_sha1 (mongoc_crypto_t *crypto,
236
235
size_t output_len ,
237
236
unsigned char * output )
238
237
{
238
+ #if defined(MONGOC_HAVE_BCRYPT_PBKDF2 )
239
239
return _bcrypt_derive_key_pbkdf2 (
240
240
_sha1_hmac_algo , password , password_len , salt , salt_len , iterations , output_len , output );
241
+ #else
242
+ return _bcrypt_derive_key_pbkdf2 (
243
+ crypto , password , password_len , salt , salt_len , iterations , output );
244
+ #endif
241
245
}
242
246
243
247
void
@@ -281,8 +285,13 @@ mongoc_crypto_cng_pbkdf2_hmac_sha256 (mongoc_crypto_t *crypto,
281
285
size_t output_len ,
282
286
unsigned char * output )
283
287
{
288
+ #if defined(MONGOC_HAVE_BCRYPT_PBKDF2 )
284
289
return _bcrypt_derive_key_pbkdf2 (
285
290
_sha256_hmac_algo , password , password_len , salt , salt_len , iterations , output_len , output );
291
+ #else
292
+ return _bcrypt_derive_key_pbkdf2 (
293
+ crypto , password , password_len , salt , salt_len , iterations , output );
294
+ #endif
286
295
}
287
296
288
297
void
0 commit comments