libp2p-ts/types/keccak/keccak-tests.ts
2018-06-24 11:18:49 +02:00

8 lines
175 B
TypeScript

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