Allow to choose if extractable or not
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
2024-06-11 14:32:23 +02:00
parent 1e5bf39b4f
commit 5cc375bd5a
6 changed files with 26 additions and 8 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ export class PrivateWrap {
private readonly pubkey: CryptoKey,
) {}
public static gen_keypair() : Promise<CryptoKeyPair> {
public static gen_keypair(extractable : boolean = true) : Promise<CryptoKeyPair> {
log.trace("generate keypair")
return crypto.subtle.generateKey(
algorithm,
true,
extractable,
["deriveKey"],
)
}