This commit is contained in:
+2
-2
@@ -12,14 +12,14 @@ export class SecretWrap {
|
||||
private readonly iv: Uint8Array,
|
||||
) {}
|
||||
|
||||
public static gen_key() : Promise<CryptoKey> {
|
||||
public static gen_key(extractable : boolean = true) : Promise<CryptoKey> {
|
||||
log.trace("generate key")
|
||||
return crypto.subtle.generateKey(
|
||||
{
|
||||
name: "AES-GCM",
|
||||
length: 256,
|
||||
},
|
||||
true,
|
||||
extractable,
|
||||
["wrapKey", "unwrapKey"],
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user