File: error-crypt.h

package info (click to toggle)
wolfssl 5.8.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 117,604 kB
  • sloc: ansic: 1,584,954; asm: 481,206; sh: 11,586; cs: 6,596; xml: 3,878; perl: 3,291; makefile: 2,058; ada: 1,891; javascript: 748; python: 636; cpp: 131; ruby: 118; objc: 80; tcl: 73
file content (49 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*!
    \ingroup Error

    \brief This function stores the error string for a particular error code
    in the given buffer.

    \return none No returns.

    \param error error code for which to get the string
    \param buffer buffer in which to store the error string. Buffer should be
    at least WOLFSSL_MAX_ERROR_SZ (80 bytes) long

    _Example_
    \code
    char errorMsg[WOLFSSL_MAX_ERROR_SZ];
    int err = wc_some_function();

    if( err != 0) { // error occurred
    	wc_ErrorString(err, errorMsg);
    }
    \endcode

    \sa wc_GetErrorString
*/
void wc_ErrorString(int err, char* buff);

/*!
    \ingroup Error

    \brief This function returns the error string for a particular error code.

    \return string Returns the error string for an error code as a
    string literal.

    \param error error code for which to get the string

    _Example_
    \code
    char * errorMsg;
    int err = wc_some_function();

    if( err != 0) { // error occurred
    	errorMsg = wc_GetErrorString(err);
    }
    \endcode

    \sa wc_ErrorString
*/
const char* wc_GetErrorString(int error);