UNPKG

simple-js-sha2-512

Version:

how to import: ``` const sha2_512 = require('simple-js-sha2-512') ``` hashing: ``` sha2_512('hello') // 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043 ```

13 lines 306 B
const sha2 = require('../src/main.js') global.utfTime = 0 global.rotrTime = 0 const startTime = Date.now() let i = 0 const amount = 10000 while (i < amount) { sha2(`${Math.random()}`) i++ } console.log(global.utfTime) console.log(global.rotrTime) console.log(amount/((Date.now() - startTime)/1000))