SodiumAllocator class

An Allocator using the libsodium memory functionality.

See https://libsodium.gitbook.io/doc/memory_management

Implemented types
Available Extensions

Constructors

SodiumAllocator(LibSodiumFFI sodium)
Default constructor
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sodium → LibSodiumFFI
The LibSodiumFFI instance used by this allocator.
final

Methods

allocate<T extends NativeType>(int byteCount, {int? alignment}) Pointer<T>
Provides sodium_malloc.
override
free(Pointer<NativeType> pointer) → void
Provides sodium_free.
override
lock(Pointer<NativeType> pointer, int byteCount) bool
Provides sodium_mlock.
memoryProtect(Pointer<NativeType> pointer, MemoryProtection memoryProtection) bool
Provides sodium_mprotect_*.
memzero(Pointer<NativeType> pointer, int byteCount) → void
Provides sodium_memzero.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unlock(Pointer<NativeType> pointer, int byteCount) bool
Provides sodium_munlock.

Operators

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