@gaonengwww/jose
Version:
JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes
17 lines (14 loc) • 846 B
TypeScript
import { JWEKeyManagementHeaderParameters, JWEHeaderParameters, CryptoKey, KeyObject, JWK, EncryptOptions, FlattenedJWE } from '../../types.d.js';
declare class FlattenedEncrypt {
#private;
constructor(plaintext: Uint8Array);
setKeyManagementParameters(parameters: JWEKeyManagementHeaderParameters): this;
setProtectedHeader(protectedHeader: JWEHeaderParameters): this;
setSharedUnprotectedHeader(sharedUnprotectedHeader: JWEHeaderParameters): this;
setUnprotectedHeader(unprotectedHeader: JWEHeaderParameters): this;
setAdditionalAuthenticatedData(aad: Uint8Array): this;
setContentEncryptionKey(cek: Uint8Array): this;
setInitializationVector(iv: Uint8Array): this;
encrypt(key: CryptoKey | KeyObject | JWK | Uint8Array, options?: EncryptOptions): Promise<FlattenedJWE>;
}
export { FlattenedEncrypt };