SubtleCrypto
This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
interface SubtleCrypto {
deriveKey(
algorithm:
,
baseKey: CryptoKey,
derivedKeyType:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>;
generateKey(
algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKeyPair>;
generateKey(
algorithm: AesKeyGenParams | HmacKeyGenParams,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>;
generateKey(
algorithm: AlgorithmIdentifier,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKeyPair | CryptoKey>;
importKey(
format: "jwk",
keyData: JsonWebKey,
algorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>;
importKey(
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
algorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>;
sign(
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
data: BufferSource,
)
: Promise<ArrayBuffer>;
unwrapKey(
format: KeyFormat,
wrappedKey: BufferSource,
unwrappingKey: CryptoKey,
unwrapAlgorithm:
,
unwrappedKeyAlgorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>;
verify(
}
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
signature: BufferSource,
data: BufferSource,
)
: Promise<boolean>;
var SubtleCrypto
: {
prototype: SubtleCrypto;
new (): SubtleCrypto;
};
Methods
generateKey(
algorithm: RsaHashedKeyGenParams | EcKeyGenParams,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKeyPair>
generateKey(
algorithm: AesKeyGenParams | HmacKeyGenParams,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>
generateKey(
algorithm: AlgorithmIdentifier,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKeyPair | CryptoKey>
importKey(
format: "jwk",
keyData: JsonWebKey,
algorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>
importKey(
format: Exclude<KeyFormat, "jwk">,
keyData: BufferSource,
algorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>
sign(
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
data: BufferSource,
)
: Promise<ArrayBuffer>
unwrapKey(
format: KeyFormat,
wrappedKey: BufferSource,
unwrappingKey: CryptoKey,
unwrapAlgorithm:
,
unwrappedKeyAlgorithm:
,
extractable: boolean,
keyUsages: KeyUsage[],
)
: Promise<CryptoKey>
verify(
algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams,
key: CryptoKey,
signature: BufferSource,
data: BufferSource,
)
: Promise<boolean>
© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/SubtleCrypto