@textile/hub > PublicKey > encrypt
PublicKey.encrypt() method
Encrypt the given data using this public key.
Signature:
encrypt(data: Uint8Array): Promise<Uint8Array>;
Parameters
Parameter | Type | Description |
---|---|---|
data | Uint8Array | The input plaintext. |
Returns:
Promise<Uint8Array>