UNPKG

664 BTypeScriptView Raw
1interface Sealed {
2 sealed: Uint8Array;
3 nonce: Uint8Array;
4}
5/**
6 * @name naclSeal
7 * @summary Seals a message using the sender's encrypting secretKey, receiver's public key, and nonce
8 * @description
9 * Returns an encrypted message which can be open only by receiver's secretKey. If the `nonce` was not supplied, a random value is generated.
10 * @example
11 * <BR>
12 *
13 * ```javascript
14 * import { naclSeal } from '@polkadot/util-crypto';
15 *
16 * naclSeal([...], [...], [...], [...]); // => [...]
17 * ```
18 */
19export declare function naclSeal(message: Uint8Array, senderBoxSecret: Uint8Array, receiverBoxPublic: Uint8Array, nonce?: Uint8Array): Sealed;
20export {};