CryptoSys API Library Manual

Error Codes

Errors may be returned as a positive or negative number depending on the calling function. For example, BAD_KEY_ERROR may be returned as -36 or +36. To find the error message corresponding to a numerical error code use the API_ErrorLookup function or the General.ErrorLookup Method.

[Changed in v5.1] Note that the error code numbering has been rationalised in v5.1 to match error codes in our other products. See the table of Changes in error codes in version 5.1 below.

If you have hardcoded error code values in your code to catch a particular error, you will need to change it.

0 = OK, success, no error (SUCCESS_NO_ERROR)
1 = Cannot open input file (OPEN_ERROR)
2 = Cannot create output file (CREATE_ERROR)
3 = File read error (READ_ERROR)
4 = File write error (WRITE_ERROR)
5 = Not enough memory (MEMORY_ERROR)
6 = Parameter is wrong or missing (BAD_PARAM_ERROR)
7 = Data is in wrong format (BAD_FORMAT_ERROR)
8 = Invalid data (INVALID_DATA_ERROR)
9 = Unexpected end of file found (EOF_ERROR)
11 = Parameter out of range (RANGE_ERROR)
12 = Duplicate data or filename (DUP_ERROR)
14 = Unexpected NULL value (NULL_ERROR)
15 = Decryption error (DECRYPT_ERROR)
17 = Invalid option (BAD_FLAG_ERROR)
18 = Failed to wipe data (WIPE_ERROR)
19 = Item is not supported (NOT_SUPPORTED_ERROR)
23 = Failed a test e.g. known answer test (TEST_FAILED_ERROR)
26 = Data not a valid length (BAD_LENGTH_ERROR)
30 = Not enough room in output buffer (SHORT_BUF_ERROR)
31 = Zlib compression error (ZLIB_COMPR_ERROR)
33 = Invalid key length (BAD_KEY_LEN_ERROR)
34 = Invalid block length (BAD_BLK_LEN_ERROR)
35 = Invalid mode (BAD_MODE_ERROR)
36 = Invalid key (BAD_KEY_ERROR)
37 = Invalid initialization vector (BAD_IV_ERROR)
38 = Invalid IV length (BAD_IV_LEN_ERROR)
40 = Authentication failed (AUTH_FAIL_ERROR)
41 = Function called out of sequence (MISUSE_ERROR)
52 = Weak key (WEAK_KEY_ERROR)
64 = Invalid context handle (INVALID_HANDLE_ERROR)
201 = PRNG: Cannot open input file (PRNG_ERR_FILE_OPEN)
202 = PRNG: Cannot create output file (PRNG_ERR_FILE_CREATE)
203 = PRNG: File read error (PRNG_ERR_FILE_READ)
204 = PRNG: File write error (PRNG_ERR_FILE_WRITE)
205 = PRNG: File locking error (PRNG_ERR_FILE_LOCK)
210 = PRNG: Uninstantiation failed (PRNG_ERR_UNINST)
211 = PRNG: Requested length is too large (PRNG_ERR_TOOBIG)
212 = PRNG: Function failed (PRNG_ERR_FAILURE)
213 = PRNG: Invalid input parameter (PRNG_ERR_BADPARAM)
214 = PRNG: Function is not available (PRNG_ERR_NOTAVAIL)
299 = PRNG: Catastrophic failure (PRNG_ERR_CATASTROPHIC)
9745 = Something not expected to happen has happened (INTERNAL_ERROR)
9999 = Miscellaneous error (MISC_ERROR)

[Contents] [Index]

[PREV: XofAlgorithm Enumeration...]   [Contents]   [Index]   
   [NEXT: Changes in error codes in version 5.1...]

Copyright © 2001-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-01-07T07:42:00Z.