1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00

test web crypto pbkdf2

This commit is contained in:
Kyle Spearrin
2018-04-17 17:56:41 -04:00
parent 9ac6f5db1f
commit 5ed0edf867
3 changed files with 99 additions and 3 deletions

View File

@@ -83,13 +83,13 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
bytes = forge.util.encodeUtf8(value);
} else {
const value64 = UtilsService.fromBufferToB64(value);
bytes = forge.util.encode64(value64);
bytes = forge.util.decode64(value64);
}
return bytes;
}
private fromForgeBytesToBuf(byteString: string): ArrayBuffer {
const b64 = forge.util.decode64(byteString);
const b64 = forge.util.encode64(byteString);
return UtilsService.fromB64ToArray(b64).buffer;
}
}