RandomX class

Dart RandomX library wrapper.

Constructors

RandomX()
RandomX default constructor.

Properties

fullMemory bool?
Returns true if init was called with fullMemory.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
final
initKey Uint8List?
no setter
isDestroyed bool
Returns true if this instance is already destroyed.
no setter
isInitialized bool
Returns true if this instance is already initialized.
no setter
platform String
Returns the platformOS and platformArchitecture.
no setter
platformArchitecture String
The current Platform architecture name.
no setter
platformOS String
The current Platform OS name.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeOfHash int
latefinal

Methods

createHashBytesArray() Uint8List
Creates a Uint8List of the size of the hash output (sizeOfHash).
destroy() → void
Destroys this RandomX instance resources.
disposeBuffers() → void
equalsInitKey(Uint8List key) bool
Returns true if key equals to initKey.
hash(Uint8List bytes) Uint8List
Hash bytes and returns the result as a Uint8List.
override
hashFirst(Uint8List bytes) → void
The RandomX hash_first function.
hashLast(Uint8List prevOutput) → void
The RandomX hash_last function.
hashNext(Uint8List bytes, Uint8List prevOutput) → void
The RandomX hash_next function.
hashTo(Uint8List bytes, Uint8List output) → void
Hash bytes and puts the result into output.
init(Uint8List key, {bool fullMemory = false}) → void
Initializes the RandomX instance with key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isLibLoaded bool
Returns true if the library is already loaded.
no setter
loadedLibraryPath String?
Returns the path of the loaded library.
no setter

Static Methods

isMacOSArm64() bool
Returns true if this is a macOS arm64.
loadLib() Future<bool>
Loads the wrapper library.