From 3716501690fb4e1ddd1af385b4d012cce2d107ac Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 19 Jun 2015 09:42:55 +0300 Subject: add buffer encryption to "boxes" --- src/error.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/error.c') 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); +} -- cgit v1.2.3