public class Ffi extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static CoverCryptWrapper |
INSTANCE |
| Constructor and Description |
|---|
Ffi() |
| Modifier and Type | Method and Description |
|---|---|
static String |
get_last_error()
Return the last error in a String that does not exceed 1023 bytes
|
static String |
get_last_error(int max_len)
Return the last error in a String that does not exceed `max_len` bytes
|
void |
set_error(String error_msg)
Set the last error on the native lib
|
static int |
unwrap(int result)
If the result of the last FFI call is in Error, recover the last error from the native code and throw an
exception wrapping it.
|
protected static final CoverCryptWrapper INSTANCE
public static int unwrap(int result)
throws CloudproofException
result - the result of the FFI callCloudproofException - in case of native library error (result is 1)public static String get_last_error() throws CloudproofException
CloudproofException - in case of native library errorpublic static String get_last_error(int max_len) throws CloudproofException
max_len - the maximum number of bytes to returnCloudproofException - in case of native library errorpublic void set_error(String error_msg) throws CloudproofException
error_msg - the last error to set on the native libCloudproofException - n case of native library errorCopyright © 2023. All rights reserved.