summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2021-10-12 16:09:46 +0530
committerGitHub <noreply@github.com>2021-10-12 16:09:46 +0530
commit58f04d8e4600445fe681e845e06f28095c888379 (patch)
treec2e06053889d309fc1a7024f9851d56095a9acba /ext/crypto/lib.deno_crypto.d.ts
parentf332d72f1653ec03b64a80d8d4949dce5564cc99 (diff)
feat(ext/crypto): implement deriveKey (#12117)
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index 4ed7c51f8..682296d3c 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -129,6 +129,10 @@ interface Pbkdf2Params extends Algorithm {
salt: BufferSource;
}
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
interface EcdhKeyDeriveParams extends Algorithm {
public: CryptoKey;
}
@@ -235,6 +239,18 @@ interface SubtleCrypto {
baseKey: CryptoKey,
length: number,
): Promise<ArrayBuffer>;
+ deriveKey(
+ algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ derivedKeyType:
+ | AlgorithmIdentifier
+ | AesDerivedKeyParams
+ | HmacImportParams
+ | HkdfParams
+ | Pbkdf2Params,
+ extractable: boolean,
+ keyUsages: KeyUsage[],
+ ): Promise<CryptoKey>;
wrapKey(
format: KeyFormat,
key: CryptoKey,