Skip to content

libsodium.SodiumException.Constructor

Andrew Lambert edited this page Mar 11, 2017 · 8 revisions

##Method Signature

 Sub Constructor(ErrorCode As Int32)

##Parameters

Name Type Comment
ErrorCode Int32 The error code.

##Remarks libsodium does not report error codes(!) These codes are defined by the binding:

  • ERR_INIT_FAILED: libsodium can not be initialized.
  • ERR_UNAVAILABLE: libsodium is not installed.
  • ERR_PROTECT_FAILED: Unable to set the protection level for the specified memory range.
  • ERR_CANT_ALLOC: Unable to create a buffer of the requested size.
  • ERR_TOO_LARGE: The data are too large for the buffer.
  • ERR_READ_DENIED: The specified memory range is secured and can not be accessed.
  • ERR_WRITE_DENIED: The specified memory range is secured and can not be modified.
  • ERR_LOCK_DENIED: The specified memory lock can not be modified.
  • ERR_INVALID_STATE: The requested operation is illegal in the current context.
  • ERR_COMPUTATION_FAILED: The requested operation failed, possibly due to resource constraints.
  • ERR_SIZE_MISMATCH: The requested operation expected input of a different length than what was provided.
  • ERR_KEYGEN_FAILED: Generating a cryptographic key pair failed.
  • ERR_KEYDERIVE_FAILED: Deriving a cryptographic key failed.
  • ERR_OPSLIMIT: The OpsLimit parameter must be greater-than or equal-to 3.
  • ERR_OUT_OF_RANGE: A parameter is invalid because it is outside the expected range.
  • ERR_CONVERSION_FAILED: The requested key-type conversion failed.

Clone this wiki locally