UNPKG

149 BJavaScriptView Raw
1const { randomBytes } = require('crypto')
2
3const { IVLENGTHS } = require('../registry')
4
5module.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8)