libp2p-ts/keccak/keccak-tests.ts
2018-06-21 11:31:52 +02:00

8 lines
181 B
TypeScript

import createKeccak = require('keccak');
const context = createKeccak('keccak256');
context.update(Buffer.from([1, 2, 3, 4, 5]));
context.update('hello world');
context.digest();