toSodiumPointer method

SodiumPointer<Int32> toSodiumPointer(
  1. LibSodiumFFI sodium, {
  2. MemoryProtection memoryProtection = MemoryProtection.readWrite,
})

Converts the list to a sodium pointer

This is done by first allocating a SodiumPointer with length elements and the copying all data from the list to the pointer.

If you want the memoryProtection to changed right after the copying is done, you can do so via this parameter. By default, the pointer keeps the default MemoryProtection.readWrite mode.

Implementation

SodiumPointer<Int32> toSodiumPointer(
  LibSodiumFFI sodium, {
  MemoryProtection memoryProtection = MemoryProtection.readWrite,
}) =>
    SodiumPointer.fromList(
      sodium,
      this,
      memoryProtection: memoryProtection,
    );