lib/crypto/crypto-engine.js
function random(len) {
    if (subtle) {
        return safeRandom(len);
    } else if (nodeCrypto) {
        return new Uint8Array(nodeCrypto.randomBytes(len));
    } else {
        throw new KdbxError(Consts.ErrorCodes.NotImplemented, 'Random not implemented');
    }
}
function random(len) {
    if (subtle) {
        return safeRandom(len);
    } else if (nodeCrypto) {
        return new Uint8Array(nodeCrypto.randomBytes(len));
    } else {
        throw new KdbxError(Consts.ErrorCodes.NotImplemented, 'Random not implemented');
    }
}
function random ( len ) { if ( subtle ) { return safeRandom ( len ) ; } else if ( nodeCrypto ) { return new Uint8Array ( nodeCrypto . randomBytes ( len ) ) ; } else { throw new KdbxError ( Consts . ErrorCodes . NotImplemented , 'Random not implemented' ) ; } }
Generates random bytes of specified length
@param {Number} len
@returns {Uint8Array}
Generates random bytes of specified length