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) {