From b835fdf8fd3910a79ab408660757d9736f82d14d Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 18 Jan 2019 11:37:01 -0500 Subject: Rename Integrity_Failure to Invalid_Authentication_Tag This makes the meaning and usage more clear. Add a specific error type so invalid tags can be distinguished without having to catch that specific type. See also #1813 --- src/lib/modes/aead/eax/eax.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/modes/aead/eax/eax.cpp') diff --git a/src/lib/modes/aead/eax/eax.cpp b/src/lib/modes/aead/eax/eax.cpp index 00253e405..1a31c3cff 100644 --- a/src/lib/modes/aead/eax/eax.cpp +++ b/src/lib/modes/aead/eax/eax.cpp @@ -184,7 +184,7 @@ void EAX_Decryption::finish(secure_vector& buffer, size_t offset) mac ^= m_ad_mac; if(!constant_time_compare(mac.data(), included_tag, tag_size())) - throw Integrity_Failure("EAX tag check failed"); + throw Invalid_Authentication_Tag("EAX tag check failed"); buffer.resize(offset + remaining); -- cgit v1.2.3