aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-19 09:42:55 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-19 09:42:55 +0300
commit3716501690fb4e1ddd1af385b4d012cce2d107ac (patch)
tree1b4f48b22cc980ba7cfb93bd5a83ec5e078157de /src/error.c
parentrefactoring (diff)
downloadaes-tools-3716501690fb4e1ddd1af385b4d012cce2d107ac.tar.gz
aes-tools-3716501690fb4e1ddd1af385b4d012cce2d107ac.zip
add buffer encryption to "boxes"
Diffstat (limited to '')
-rw-r--r--src/error.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c
index bf35668..fd9136a 100644
--- a/src/error.c
+++ b/src/error.c
@@ -26,6 +26,7 @@ static const char* aesni_strerror_messages[] =
"Couldn't parse",
"Invalid PKCS7 padding (wrong key?)",
"Not implemented",
+ "Invalid plaintext length",
};
const char* aesni_strerror(AesNI_StatusCode ec)
@@ -103,6 +104,7 @@ static AesNI_ErrorFormatter err_formatters[] =
&aesni_format_parse_error,
&aesni_format_error_strerror,
&aesni_format_not_implemented_error,
+ &aesni_format_error_strerror,
};
size_t aesni_format_error(
@@ -201,3 +203,9 @@ AesNI_StatusCode aesni_error_not_implemented(
return status;
}
+
+AesNI_StatusCode aesni_error_invalid_plaintext_length(
+ AesNI_ErrorDetails* err_details)
+{
+ return aesni_make_error(err_details, AESNI_INVALID_PLAINTEXT_LENGTH_ERROR);
+}