From 1baede1ae4bc1510b98866beec22270f17d30050 Mon Sep 17 00:00:00 2001 From: microshine Date: Thu, 14 Feb 2019 14:01:58 +0300 Subject: [PATCH] Apply updated webcrypto-core --- src/mechs/pbkdf/pbkdf2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mechs/pbkdf/pbkdf2.ts b/src/mechs/pbkdf/pbkdf2.ts index eaa9d85..69f1b08 100644 --- a/src/mechs/pbkdf/pbkdf2.ts +++ b/src/mechs/pbkdf/pbkdf2.ts @@ -6,7 +6,7 @@ export class Pbkdf2Provider extends core.Pbkdf2Provider { public async onDeriveBits(algorithm: Pbkdf2Params, baseKey: PbkdfCryptoKey, length: number): Promise { return new Promise((resolve, reject) => { - const salt = this.prepareData(algorithm.salt); + const salt = core.BufferSourceConverter.toArrayBuffer(algorithm.salt); const hash = (algorithm.hash as Algorithm).name.replace("-", ""); crypto.pbkdf2(baseKey.data, Buffer.from(salt), algorithm.iterations, length >> 3, hash, (err, derivedBits) => { if (err) {