add an instance of Eq for IV
This commit is contained in:
parent
28e64ec8d3
commit
21c4c1befb
@ -52,6 +52,8 @@ data IV c = forall byteArray . ByteArray byteArray => IV byteArray
|
|||||||
instance BlockCipher c => ByteArrayAccess (IV c) where
|
instance BlockCipher c => ByteArrayAccess (IV c) where
|
||||||
withByteArray (IV z) f = withByteArray z f
|
withByteArray (IV z) f = withByteArray z f
|
||||||
byteArrayLength (IV z) = byteArrayLength z
|
byteArrayLength (IV z) = byteArrayLength z
|
||||||
|
instance Eq (IV c) where
|
||||||
|
(IV a) == (IV b) = byteArrayEq a b
|
||||||
|
|
||||||
type XTS cipher = (cipher, cipher)
|
type XTS cipher = (cipher, cipher)
|
||||||
-> IV cipher -- ^ Usually represent the Data Unit (e.g. disk sector)
|
-> IV cipher -- ^ Usually represent the Data Unit (e.g. disk sector)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user