decrypt() function
Decrypts the given data
using a Curve25519 variant of the private key.
Assumes ciphertext includes ephemeral public key and nonce used in original encryption (e.g., via encrypt() function).
Signature:
export declare function decrypt(ciphertext: Uint8Array, privKey: Uint8Array, type?: string): Promise<Uint8Array>;
Parameters
Parameter | Type | Description |
---|---|---|
ciphertext | Uint8Array | Data to decrypt. |
privKey | Uint8Array | |
type | string |
Returns:
Promise<Uint8Array>