Skip to content

EncryptJweInput ​

EncryptJweInput ​

Input to encryptCompactJwe.

ts
interface EncryptJweInput {
	readonly publicKey: CryptoKey;
	readonly plaintext: Uint8Array;
	readonly algorithm: JweAlgorithm;
	readonly encryption: JweEncryption;
	readonly header?: JsonObject;
	readonly limits?: Partial<JoseLimits>;
}

Properties

  • readonly publicKey: CryptoKey — An RSA-OAEP/SHA-512 public key with encrypt usage, 2048–8192 bits.
  • readonly plaintext: Uint8Array — Payload bytes; text encoding is the caller's decision.
  • readonly algorithm: JweAlgorithm — Explicit key-management algorithm.
  • readonly encryption: JweEncryption — Explicit content-encryption algorithm.
  • readonly header?: JsonObject — Additional protected JSON data. alg and enc, if supplied, must agree. No default typ.
  • readonly limits?: Partial<JoseLimits> — Existing JOSE bounds; maxPayloadBytes also bounds plaintext/ciphertext and maxSignatureBytes bounds the encrypted CEK.

Released under the MIT License.