automotive-cse 0.1.7.0 → 0.1.8.0
raw patch · 2 files changed
+9/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Codec.Automotive.CSE.Internal: indexM4 :: MonadPlus m => ByteString -> m (UID, Word8, Word8)
Files
automotive-cse.cabal view
@@ -1,6 +1,6 @@ name: automotive-cse-version: 0.1.7.0+version: 0.1.8.0 synopsis: Automotive CSE emulation description: This package includes Cryptography Security Engine (CSE) codec emulation for automotive things.
src/Codec/Automotive/CSE/Internal.hs view
@@ -4,7 +4,7 @@ M1, unM1, makeM1, extractM1, refineM1, M2, unM2, makeM2, extractM2, refineM2, M3, unM3, makeM3,- M4, unM4, makeM4, extractM4, refineM4, makeM4', extractM4',+ M4, unM4, makeM4, extractM4, refineM4, indexM4, makeM4', extractM4', M5, unM5, makeM5, K1, K1', makeK1,@@ -321,6 +321,13 @@ ps@((uid, kid, akid), counter) = extractM4 k3 m4 guard $ makeM4 k3 uid kid akid counter == m4 return (m4, ps)++indexM4 :: MonadPlus m+ => ByteString+ -> m (UID, Word8, Word8)+indexM4 s = do+ guard $ BS.length s == 32+ snd `liftM` refineM1 (BS.take 16 s) newtype M5 = M5 ByteString deriving Eq