Apply updated webcrypto-core

This commit is contained in:
microshine 2019-02-14 14:01:58 +03:00
parent 5b93440ce9
commit 1baede1ae4
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ export class Pbkdf2Provider extends core.Pbkdf2Provider {
public async onDeriveBits(algorithm: Pbkdf2Params, baseKey: PbkdfCryptoKey, length: number): Promise<ArrayBuffer> {
return new Promise<ArrayBuffer>((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) {