Crypto.randomBytes >= 0.1.4

Purpose

Generate a random string

Syntax

Crypto.randomBytes ( Numberbytesize Functioncallback );

Parameters

bytesize
callback

Return values

Examples

Get a random string

Crypto.randomBytes(10);>>> "ù%d^$-µé#§" // Will actually return random bytes, not utf-8 friendly

Crypto.randomBytes(10, function(err, result) {
    
});