import { WebCryptoEncryptionMaterial, WebCryptoDecryptionMaterial, AwsEsdkJsCryptoKey, WebCryptoMaterial, SupportedAlgorithmSuites } from '@aws-crypto/material-management'; import { WebCryptoBackend } from '@aws-crypto/web-crypto-backend'; export interface GetSubtleEncrypt { (iv: Uint8Array, additionalData: Uint8Array): (data: Uint8Array) => Promise; } interface EncryptInfo { getSubtleEncrypt: GetSubtleEncrypt; keyCommitment?: Uint8Array; } export interface GetEncryptInfo { (messageId: Uint8Array): Promise; } export interface SubtleSign { (data: Uint8Array): PromiseLike; } export interface WebCryptoEncryptionMaterialHelper { getEncryptInfo: GetEncryptInfo; subtleSign?: SubtleSign; dispose: () => void; } export interface GetEncryptHelper { (material: WebCryptoEncryptionMaterial): Promise; } export declare const getEncryptHelper: GetEncryptHelper; export interface GetSubtleDecrypt extends GetSubtleEncrypt { } export interface GetDecryptInfo { (messageId: Uint8Array, commitKey?: Uint8Array): Promise; } interface SubtleVerify { (signature: Uint8Array, data: Uint8Array): PromiseLike; } export interface WebCryptoDecryptionMaterialHelper { getDecryptInfo: GetDecryptInfo; subtleVerify?: SubtleVerify; dispose: () => void; } export interface GetDecryptionHelper { (material: WebCryptoDecryptionMaterial): Promise; } export declare const getDecryptionHelper: GetDecryptionHelper; type SubtleFunctionName = 'encrypt' | 'decrypt'; type PickSubtleReturn = T extends 'encrypt' ? { getSubtleEncrypt: GetSubtleEncrypt; keyCommitment?: Uint8Array; } : GetSubtleDecrypt; export declare function currySubtleFunction, Name extends SubtleFunctionName>(material: Material, backend: WebCryptoBackend, subtleFunctionName: Name): (messageId: Uint8Array, commitKey?: Uint8Array) => Promise>; export declare function WebCryptoKdf>(subtle: SubtleCrypto, material: T, cryptoKey: AwsEsdkJsCryptoKey, keyUsages: SubtleFunctionName[], nonce: Uint8Array, commitKey?: Uint8Array): Promise<{ deriveKey: AwsEsdkJsCryptoKey; keyCommitment?: Uint8Array; }>; export declare function buildAlgorithmForKDF(suite: SupportedAlgorithmSuites, nonce: Uint8Array): { name: "HKDF"; hash: { name: import("@aws-crypto/material-management").NodeHash | import("@aws-crypto/material-management").WebCryptoHash; }; info: Uint8Array; salt: Uint8Array; }; export declare function deriveKeyCommitment>(subtle: SubtleCrypto, material: T, cryptoKey: AwsEsdkJsCryptoKey, nonce: Uint8Array, commitKey?: Uint8Array): Promise; export declare function importCryptoKey>(backend: WebCryptoBackend, material: T, keyUsages?: KeyUsage[]): Promise; export declare function _importCryptoKey>(subtle: SubtleCrypto, material: T, keyUsages?: KeyUsage[]): Promise; export {}; //# sourceMappingURL=material_helpers.d.ts.map