mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 18:23:31 +00:00
node crypto aes implementations
This commit is contained in:
@@ -102,10 +102,10 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
|
||||
return await this.subtle.decrypt({ name: 'AES-CBC', iv: iv }, impKey, data);
|
||||
}
|
||||
|
||||
randomBytes(length: number): ArrayBuffer {
|
||||
randomBytes(length: number): Promise<ArrayBuffer> {
|
||||
const arr = new Uint8Array(length);
|
||||
this.crypto.getRandomValues(arr);
|
||||
return arr.buffer;
|
||||
return Promise.resolve(arr.buffer);
|
||||
}
|
||||
|
||||
private toBuf(value: string | ArrayBuffer): ArrayBuffer {
|
||||
|
||||
Reference in New Issue
Block a user