[Poly1305] fix size of Authentication tag creation from Bytestring
This commit is contained in:
parent
7f3b525699
commit
da2f445690
@ -46,7 +46,7 @@ newtype Auth = Auth Bytes
|
|||||||
|
|
||||||
authTag :: ByteArrayAccess b => b -> CryptoFailable Auth
|
authTag :: ByteArrayAccess b => b -> CryptoFailable Auth
|
||||||
authTag b
|
authTag b
|
||||||
| B.length b /= 32 = CryptoFailed $ CryptoError_AuthenticationTagSizeInvalid
|
| B.length b /= 16 = CryptoFailed $ CryptoError_AuthenticationTagSizeInvalid
|
||||||
| otherwise = CryptoPassed $ Auth $ B.convert b
|
| otherwise = CryptoPassed $ Auth $ B.convert b
|
||||||
|
|
||||||
instance Eq Auth where
|
instance Eq Auth where
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user