Fixed getRandomValue
This commit is contained in:
parent
f8bc06bb8b
commit
0377875915
@ -27,7 +27,7 @@ export default class CryptoService extends BaseService {
|
||||
*/
|
||||
public async encrypt(data: string) {
|
||||
const encodedData = Buffer.from(data);
|
||||
const iv = crypto.getRandomValues(new Uint8Array(16));
|
||||
const iv = crypto.webcrypto.getRandomValues(new Uint8Array(16))
|
||||
const key = await this.getKey();
|
||||
const cipherData = await this.subtle.encrypt(
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user