How to use the js-sha3.keccak_256.array function in js-sha3

To help you get started, we’ve selected a few js-sha3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ukd1 / toshi-testnet-faucet / src / lib / Wallet.js View on Github external
get address() {
    if (!this._address) {
      this._address = keccak256.array(this.keypair.getPublic().encode('', false).slice(1)).slice(12, 32);
    }
    return "0x" + hash.utils.toHex(this._address);
  }
github fckt / eth-signer-app / src / common.js View on Github external
export function fromPhrase(phrase) {
  let seed = keccak256.array(phrase);
  let kp;
  for (let i = 0; i <= 16384 || !toAddress(kp = ec.keyFromPrivate(seed)).startsWith('00'); ++i)
    seed = keccak256.array(seed);
  return kp;
}
github fckt / eth-signer-app / src / common.js View on Github external
export function fromPhrase(phrase) {
  let seed = keccak256.array(phrase);
  let kp;
  for (let i = 0; i <= 16384 || !toAddress(kp = ec.keyFromPrivate(seed)).startsWith('00'); ++i)
    seed = keccak256.array(seed);
  return kp;
}