generateEntropy static method

SecretBytes generateEntropy(
  1. Mnemonic mnemonic, {
  2. String password = "",
})

Generates entropy from a given mnemonic and optional passphrase using HMAC-SHA512.

Implementation

static SecretBytes generateEntropy(
  Mnemonic mnemonic, {
  String password = "",
}) {
  return SecretBytes.take(
    QuickCrypto.hmacSha512Hash(
      StringUtils.encode(mnemonic.toStr()),
      StringUtils.encode(password),
    ),
  );
}