Skip to content

eciesOpen

eciesOpen(sealed, recipientPrivateKey): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/core/src/ecies.ts:186

Decrypt a sealed payload produced by eciesSeal using the recipient’s P-256 ECDH private key. Throws if the sealed bytes are truncated, the ephemeral public key cannot be imported, or the AES-GCM tag fails to verify (typically: wrong recipient private key, or tampered payload).

Uint8Array

The self-describing sealed bytes.

CryptoKey

The recipient’s P-256 ECDH private key (CryptoKey, algorithm { name: 'ECDH', namedCurve: 'P-256' }, usages must include 'deriveBits').

Promise<Uint8Array<ArrayBufferLike>>