@plugnet/util-crypto
Version:
A collection of useful crypto utilities for @plugnet
16 lines (15 loc) • 452 B
TypeScript
/**
* @name naclDecrypt
* @summary Decrypts a message using the supplied secretKey and nonce
* @description
* Returns an decrypted message, using the `secret` and `nonce`.
* @example
* <BR>
*
* ```javascript
* import { naclDecrypt } from '@plugnet/util-crypto';
*
* naclDecrypt([...], [...], [...]); // => [...]
* ```
*/
export default function naclDecrypt(encrypted: Uint8Array, nonce: Uint8Array, secret: Uint8Array): Uint8Array | null;