@hpke/common
Version:
A Hybrid Public Key Encryption (HPKE) internal-use common module for @hpke family modules.
25 lines • 1.03 kB
TypeScript
export declare const AEAD_USAGES: KeyUsage[];
/**
* The AEAD encryption context interface.
*/
export interface AeadEncryptionContext {
/**
* Encrypts data with an initialization vector and additional authenticated data.
*
* @param iv An initialization vector.
* @param data A plain text as bytes to be encrypted.
* @param aad Additional authenticated data as bytes fed by an application.
* @returns A cipher text as bytes.
*/
seal(iv: ArrayBuffer, data: ArrayBuffer, aad: ArrayBuffer): Promise<ArrayBuffer>;
/**
* Decrypts data with an initialization vector and additional authenticated data.
*
* @param iv An initialization vector.
* @param data A plain text as bytes to be encrypted.
* @param aad Additional authenticated data as bytes fed by an application.
* @returns A decrypted plain text as bytes.
*/
open(iv: ArrayBuffer, data: ArrayBuffer, aad: ArrayBuffer): Promise<ArrayBuffer>;
}
//# sourceMappingURL=aeadEncryptionContext.d.ts.map