Skip to content

Commit

Permalink
Strict byteArray of IV c
Browse files Browse the repository at this point in the history
This provides a way to seq `IV c` and its content when client wants to
prevent thunk exploding, It's not rare to apply multiple `ivAdd` on
single `IV c` and we often don't want thunk here.
  • Loading branch information
TheKK committed Sep 15, 2023
1 parent 50792f1 commit bc880ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Crypto/Cipher/Types/Block.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import Foreign.Ptr
import Foreign.Storable

-- | an IV parametrized by the cipher
data IV c = forall byteArray . ByteArray byteArray => IV byteArray
data IV c = forall byteArray . ByteArray byteArray => IV !byteArray

instance BlockCipher c => ByteArrayAccess (IV c) where
withByteArray (IV z) f = withByteArray z f
Expand Down

0 comments on commit bc880ce

Please sign in to comment.