This commit is contained in:
Vincent Hanquez 2016-04-09 13:45:18 +01:00
commit 605e5cf6a6
2 changed files with 5 additions and 5 deletions

View File

@ -12,7 +12,7 @@
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Crypto.MAC.CMAC
( cmac
, CMAC(..)
, CMAC
, subKeys
) where
@ -24,9 +24,9 @@ import Crypto.Cipher.Types
import Crypto.Internal.ByteArray (ByteArrayAccess, ByteArray, Bytes)
import qualified Crypto.Internal.ByteArray as B
newtype CMAC a = CMAC { cmacGetBytes :: Bytes }
deriving ByteArrayAccess
-- | Authentication code
newtype CMAC a = CMAC Bytes
deriving (ByteArrayAccess)
instance Eq (CMAC a) where
CMAC b1 == CMAC b2 = B.constEq b1 b2

View File

@ -61,7 +61,7 @@ msg0 :: ByteString
msg0 = BS.empty
bsCMAC :: BlockCipher k => k -> ByteString -> ByteString
bsCMAC k = B.convert . CMAC.cmacGetBytes . CMAC.cmac k
bsCMAC k = B.convert . CMAC.cmac k
gAES128 :: TestTree
gAES128 =