Scrypt class

A class for performing scrypt key derivation.

Scrypt is a key derivation function designed to be secure against both hardware and software attacks. It is commonly used for securely deriving encryption keys from user-provided passwords.

Fields:

  • _xy: A list of 32-bit unsigned integers representing intermediate data during scrypt key derivation.
  • _v: A list of 32-bit unsigned integers representing additional intermediate data during scrypt key derivation.
  • n: An integer representing the CPU/memory cost parameter. It defines the general work factor for scrypt.
  • r: An integer representing the block size parameter, which specifies the number of iterations and memory size used.
  • p: An integer representing the parallelization parameter, which controls the amount of parallel processing.

Constructors

Scrypt(int n, int r, int p)
Creates a new Scrypt instance for key derivation.

Properties

hashCode int
The hash code for this object.
no setterinherited
n int
latefinal
p int
latefinal
r int
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

derive(List<int> password, List<int> salt, int dkLen) List<int>
Derives a key from the given password and salt using scrypt key derivation.
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

deriveKey(List<int> password, List<int> salt, {int dkLen = 32, int r = 8, int n = 8192, int p = 1}) List<int>