TonEntropyGeneratorUtils class
The TonEntropyGeneratorUtils class provides utility methods for handling entropy generation and validation related to the TON (The Open Network) blockchain. It includes methods to determine if a given entropy corresponds to a basic seed, a password-protected seed, and if a password is required based on a mnemonic phrase.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
generateEnteropy(
Mnemonic mnemonic, {String password = ""}) → List< int> - Generates entropy from a given mnemonic and optional passphrase using HMAC-SHA512.
-
isBasicSeed(
List< int> entropy) → bool - 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.
-
isPasswordNeed(
Mnemonic mnemonic) → bool - Checks if a password is needed for the given mnemonic by generating its entropy and evaluating it with isPasswordSeed and isBasicSeed methods.
-
isPasswordSeed(
List< int> entropy) → bool - Determines if the provided entropy is a password-protected seed by using PBKDF2 with a predefined salt and a single iteration. Returns true if the derived key's first byte is 1.
Constants
- basicSeedPbkdfIterations → const int
- Constants defining the number of iterations for the PBKDF2 key derivation function.
- passwordSeedPbkdfIterations → const int
- seedFastVersionSalt → const String
- seedVersionSalt → const String