How to use the kMaxLength function from safe-buffer
Find comprehensive JavaScript safe-buffer.kMaxLength code examples handpicked from public code repositorys.
GitHub: browserify/randomfill
3 4 5 6 7 8 9 10 11 12
throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') } var safeBuffer = require('safe-buffer') var randombytes = require('randombytes') var Buffer = safeBuffer.Buffer var kBufferMaxLength = safeBuffer.kMaxLength var crypto = global.crypto || global.msCrypto var kMaxUint32 = Math.pow(2, 32) - 1 function assertOffset (offset, length) { if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare
5
9
0
+ 3 other calls in file
safe-buffer.from is the most popular function in safe-buffer (2601 examples)