summaryrefslogtreecommitdiff
path: root/ext/crypto/lib.deno_crypto.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/crypto/lib.deno_crypto.d.ts')
-rw-r--r--ext/crypto/lib.deno_crypto.d.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/crypto/lib.deno_crypto.d.ts b/ext/crypto/lib.deno_crypto.d.ts
index a62e69632..5a554015a 100644
--- a/ext/crypto/lib.deno_crypto.d.ts
+++ b/ext/crypto/lib.deno_crypto.d.ts
@@ -109,6 +109,18 @@ interface RsaKeyAlgorithm extends KeyAlgorithm {
publicExponent: Uint8Array;
}
+interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: BufferSource;
+ salt: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: BufferSource;
+}
+
/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
interface CryptoKey {
readonly algorithm: KeyAlgorithm;
@@ -194,6 +206,11 @@ interface SubtleCrypto {
key: CryptoKey,
data: BufferSource,
): Promise<ArrayBuffer>;
+ deriveBits(
+ algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params,
+ baseKey: CryptoKey,
+ length: number,
+ ): Promise<ArrayBuffer>;
}
declare interface Crypto {