UNPKG

tweetnacl-ts

Version:

Port of TweetNaCl cryptographic library to TypeScript (and ES6)

11 lines (8 loc) 232 B
import { ByteArray } from './array'; import { _randomBytes } from './server/random'; export { _randomBytes }; export function randomBytes(n: number): ByteArray { const b = ByteArray(n); _randomBytes(b, n); return b; }