| title | Keccak256 hashing |
|---|
This package provides Keccak256 hashing functions, as used by Ethereum and Swarm.
npm install @erebos/keccak256import { hash, pubKeyToAddress } from '@erebos/keccak256'
const hashed = hash(Buffer.from('hello'))
const pubKey = Buffer.from('...')
const address = pubKeyToAddress(pubKey)Hexadecimal-encoded string prefixed with 0x. This type is exported by the @erebos/hex package.
Arguments
input: Array<number> | Buffer
Returns Array<number>
Returns the Ethereum address from the provided key.
Arguments
key: hexValue | Array<number> | Buffer
Returns hexValue