isBasicSeed static method

bool isBasicSeed(
  1. List<int> entropy
)

Determines if the provided entropy is a basic seed by using PBKDF2 with a predefined salt and iteration count. Returns true if the derived key's first byte is 0.

Implementation

static bool isBasicSeed(List<int> entropy) {
  final scrypt = QuickCrypto.pbkdf2DeriveKey(
      password: entropy,
      salt: seedVersionSalt.codeUnits,
      iterations: basicSeedPbkdfIterations);
  return scrypt[0] == 0;
}