UNPKG

tweetnacl-ts

Version:

Port of TweetNaCl cryptographic library to TypeScript (and ES6)

11 lines (10 loc) 481 B
import { ByteArray } from './array'; export declare const enum SecretBoxLength { Key = 32, Nonce = 24, Overhead = 16, Zero = 32 } export declare function secretbox(msg: ByteArray, nonce: ByteArray, key: ByteArray): ByteArray; export declare function secretbox_open(box: ByteArray, nonce: ByteArray, key: ByteArray): ByteArray | undefined; export declare function _onetimeauth(out: ByteArray, outpos: number, m: ByteArray, mpos: number, n: number, k: ByteArray): 0;