1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00

fix(ext/crypto): KeyAlgorithm typings for supported algorithms (#11738)

This commit is contained in:
Divy Srivastava 2021-08-24 18:45:25 +05:30 committed by GitHub
parent 1b7848c4a9
commit 46e4ba38b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,24 @@ interface HmacImportParams extends Algorithm {
length?: number; length?: number;
} }
interface EcKeyAlgorithm extends KeyAlgorithm {
namedCurve: NamedCurve;
}
interface HmacKeyAlgorithm extends KeyAlgorithm {
hash: KeyAlgorithm;
length: number;
}
interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
hash: KeyAlgorithm;
}
interface RsaKeyAlgorithm extends KeyAlgorithm {
modulusLength: number;
publicExponent: Uint8Array;
}
/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */ /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
interface CryptoKey { interface CryptoKey {
readonly algorithm: KeyAlgorithm; readonly algorithm: KeyAlgorithm;