Skip to content

libsodium.SodiumException.Constructor

Andrew Lambert edited this page Jan 21, 2023 · 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:

Name Value Comment
ERR_CANT_ALLOC -5 Unable to create a buffer of the requested size.
ERR_COMPUTATION_FAILED -12 The requested operation failed, possibly due to resource constraints.
ERR_CONVERSION_FAILED -18 The requested key-type conversion failed.
ERR_DECRYPT_FAIL -28 Decryption or authentication failed.
ERR_FUNCTION_UNAVAILABLE -23 This version of libsodium does not export the requested function.
ERR_IMPORT_ENCRYPTED -20 This exported key is password protected but no password was provided.
ERR_IMPORT_INVALID -26 The data do not conform to the export format.
ERR_IMPORT_PASSWORD -19 The given password does not decrypt this exported key.
ERR_INIT_FAILED -2 libsodium can not be initialized.
ERR_INVALID_STATE -11 The requested operation is illegal in the current context.
ERR_KEYDERIVE_FAILED -15 Deriving a cryptographic key failed.
ERR_KEYGEN_FAILED -14 Generating a cryptographic key pair failed.
ERR_KEYTYPE_MISMATCH -24 The specified key is of a type that is not intended for the requested operation.
ERR_LOCK_DENIED -9 The specified memory lock can not be modified.
ERR_OPSLIMIT -16 The OpsLimit parameter must be greater-than or equal-to 3.
ERR_OUT_OF_BOUNDS -10 The requested operation failed because it would have exceeded an allocation boundary.
ERR_OUT_OF_RANGE -17 A parameter is invalid because it is outside the expected range.
ERR_PADDING -27 Error while padding or unpadding data.
ERR_PARAMETER_CONFLICT -25 Two or more parameters are mutually contradictory.
ERR_PROTECT_FAILED -4 Unable to set the protection level for the specified memory range.
ERR_READ_DENIED -7 The specified memory range is secured and can not be accessed.
ERR_SIZE_MISMATCH -13 The requested operation expected input of a different length than what was provided.
ERR_SIZE_REQUIRED -22 The requested operation cannot be performed on MemoryBlocks of unknown size.
ERR_TOO_LARGE -6 The data are too large for the buffer.
ERR_UNAVAILABLE -3 libsodium is not installed.
ERR_UNSUITABLE -29 The specified algorithm is not suitable for the requested operation.
ERR_WRITE_DENIED -8 The specified memory range is secured and can not be modified.
ERR_WRONG_HALF -21 The PublicKey class may not be used with the secret half of keypairs.
Clone this wiki locally