subtle
subtle: {
digest(algorithm: string, data: BufferSource): Promise<ArrayBuffer>;
importKey(
format: string,
keyData: BufferSource,
algorithm: string | object,
extractable: boolean,
keyUsages: string[],
): Promise<CryptoKey>;
encrypt(
algorithm: string | object,
key: CryptoKey,
data: BufferSource,
): Promise<ArrayBuffer>;
decrypt(
algorithm: string | object,
key: CryptoKey,
data: BufferSource,
): Promise<ArrayBuffer>;
deriveBits(
algorithm: object,
baseKey: CryptoKey,
length: number,
): Promise<ArrayBuffer>;
}
WebCrypto API interface for encryption operations. Compatible with both browser (window.crypto) and Node.js (global.crypto).