libp2p-ts/types/keccak/keccak-tests.ts

8 lines
175 B
TypeScript
Raw Normal View History

2018-06-22 15:43:18 +02:00
import createKeccak from 'keccak';
2018-06-21 11:31:52 +02:00
const context = createKeccak('keccak256');
context.update(Buffer.from([1, 2, 3, 4, 5]));
context.update('hello world');
context.digest();