diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-05-16 12:08:45 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-05-23 18:55:05 +0100 |
commit | f9139dfa6aea6ca8c4054a5b5fff9be484d978fa (patch) | |
tree | 940d7711e9c17f860c808ec809b86209a1cdef0e /src/utility.cpp | |
parent | e533b0dc8ef606aa808b38d2f49d9baf438dae47 (diff) |
Convert error.hh to plain C
Diffstat (limited to 'src/utility.cpp')
-rw-r--r-- | src/utility.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utility.cpp b/src/utility.cpp index 2217778..2169e60 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -18,7 +18,7 @@ olm::Utility::Utility( -) : last_error(olm::ErrorCode::SUCCESS) { +) : last_error(OlmErrorCode::OLM_SUCCESS) { } @@ -32,7 +32,7 @@ size_t olm::Utility::sha256( std::uint8_t * output, std::size_t output_length ) { if (output_length < sha256_length()) { - last_error = olm::ErrorCode::OUTPUT_BUFFER_TOO_SMALL; + last_error = OlmErrorCode::OLM_OUTPUT_BUFFER_TOO_SMALL; return std::size_t(-1); } crypto_sha256(input, input_length, output); @@ -46,11 +46,11 @@ size_t olm::Utility::ed25519_verify( std::uint8_t const * signature, std::size_t signature_length ) { if (signature_length < olm::SIGNATURE_LENGTH) { - last_error = olm::ErrorCode::BAD_MESSAGE_MAC; + last_error = OlmErrorCode::OLM_BAD_MESSAGE_MAC; return std::size_t(-1); } if (!olm::ed25519_verify(key, message, message_length, signature)) { - last_error = olm::ErrorCode::BAD_MESSAGE_MAC; + last_error = OlmErrorCode::OLM_BAD_MESSAGE_MAC; return std::size_t(-1); } return std::size_t(0); |