[Poly1305] fix size of Authentication tag creation from Bytestring

This commit is contained in:
Vincent Hanquez 2015-11-06 22:00:49 +00:00
parent 7f3b525699
commit da2f445690

View File

@ -46,7 +46,7 @@ newtype Auth = Auth Bytes
authTag :: ByteArrayAccess b => b -> CryptoFailable Auth
authTag b
| B.length b /= 32 = CryptoFailed $ CryptoError_AuthenticationTagSizeInvalid
| B.length b /= 16 = CryptoFailed $ CryptoError_AuthenticationTagSizeInvalid
| otherwise = CryptoPassed $ Auth $ B.convert b
instance Eq Auth where