(algo, message, encoding, n, len, outEnc)
| 59 | } |
| 60 | |
| 61 | function streamWrite(algo, message, encoding, n, len, outEnc) { |
| 62 | const written = n * len; |
| 63 | const bits = written * 8; |
| 64 | const gbits = bits / (1024 * 1024 * 1024); |
| 65 | |
| 66 | while (n-- > 0) { |
| 67 | const h = crypto.createHash(algo); |
| 68 | |
| 69 | if (outEnc !== 'buffer') |
| 70 | h.setEncoding(outEnc); |
| 71 | |
| 72 | h.write(message, encoding); |
| 73 | h.end(); |
| 74 | h.read(); |
| 75 | } |
| 76 | |
| 77 | bench.end(gbits); |
| 78 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…