Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Crypto.Implementation

type Implementation = {
aes: {
decrypt: (
encrypted: Uint8Array,
key: CryptoKey | Uint8Array,
alg: SymmAlg,
iv?: Uint8Array,
) => Promise<Uint8Array>
;
encrypt: (
data: Uint8Array,
key: CryptoKey | Uint8Array,
alg: SymmAlg,
iv?: Uint8Array,
) => Promise<Uint8Array>
;
exportKey: (key: CryptoKey) => Promise<Uint8Array>;
genKey: (alg: SymmAlg) => Promise<CryptoKey>;
}
;
did: {
keyTypes: Record<string, {
magicBytes: Uint8Array;
verify: (args: VerifyArgs) => Promise<boolean>;
}
>
;
}
;
hash: {
sha256: (bytes: Uint8Array) => Promise<Uint8Array>;
}
;
keystore: {
clearStore: () => Promise<void>;
decrypt: (encrypted: Uint8Array) => Promise<Uint8Array>;
exportSymmKey: (name: string) => Promise<Uint8Array>;
getAlgorithm: () => Promise<string>;
getUcanAlgorithm: () => Promise<string>;
importSymmKey: (key: Uint8Array, name: string) => Promise<void>;
keyExists: (keyName: string) => Promise<boolean>;
publicExchangeKey: () => Promise<Uint8Array>;
publicWriteKey: () => Promise<Uint8Array>;
sign: (message: Uint8Array) => Promise<Uint8Array>;
}
;
misc: {
randomNumbers: (options: {
amount: number;
}
) => Uint8Array
;
}
;
rsa: {
decrypt: (data: Uint8Array, privateKey: CryptoKey | Uint8Array) => Promise<Uint8Array>;
encrypt: (message: Uint8Array, publicKey: CryptoKey | Uint8Array) => Promise<Uint8Array>;
exportPublicKey: (key: CryptoKey) => Promise<Uint8Array>;
genKey: () => Promise<CryptoKeyPair>;
}
;
}
;

§Type

§
{
aes: {
decrypt: (
encrypted: Uint8Array,
key: CryptoKey | Uint8Array,
alg: SymmAlg,
iv?: Uint8Array,
) => Promise<Uint8Array>
;
encrypt: (
data: Uint8Array,
key: CryptoKey | Uint8Array,
alg: SymmAlg,
iv?: Uint8Array,
) => Promise<Uint8Array>
;
exportKey: (key: CryptoKey) => Promise<Uint8Array>;
genKey: (alg: SymmAlg) => Promise<CryptoKey>;
}
;
did: {
keyTypes: Record<string, {
magicBytes: Uint8Array;
verify: (args: VerifyArgs) => Promise<boolean>;
}
>
;
}
;
hash: {
sha256: (bytes: Uint8Array) => Promise<Uint8Array>;
}
;
keystore: {
clearStore: () => Promise<void>;
decrypt: (encrypted: Uint8Array) => Promise<Uint8Array>;
exportSymmKey: (name: string) => Promise<Uint8Array>;
getAlgorithm: () => Promise<string>;
getUcanAlgorithm: () => Promise<string>;
importSymmKey: (key: Uint8Array, name: string) => Promise<void>;
keyExists: (keyName: string) => Promise<boolean>;
publicExchangeKey: () => Promise<Uint8Array>;
publicWriteKey: () => Promise<Uint8Array>;
sign: (message: Uint8Array) => Promise<Uint8Array>;
}
;
misc: {
randomNumbers: (options: {
amount: number;
}
) => Uint8Array
;
}
;
rsa: {
decrypt: (data: Uint8Array, privateKey: CryptoKey | Uint8Array) => Promise<Uint8Array>;
encrypt: (message: Uint8Array, publicKey: CryptoKey | Uint8Array) => Promise<Uint8Array>;
exportPublicKey: (key: CryptoKey) => Promise<Uint8Array>;
genKey: () => Promise<CryptoKeyPair>;
}
;
}
[src]