Use mkLE, not LE
to make sure the conversion to little endian is actually happening. This fixes a test failure in ChaChaPoly1305. Fixes #31.
This commit is contained in:
parent
4beda3a49d
commit
507a8f8cea
@ -117,5 +117,5 @@ finalize :: State -> Poly1305.Auth
|
|||||||
finalize (State _ macState aadLength plainLength) =
|
finalize (State _ macState aadLength plainLength) =
|
||||||
Poly1305.finalize $ Poly1305.updates macState
|
Poly1305.finalize $ Poly1305.updates macState
|
||||||
[ pad16 plainLength
|
[ pad16 plainLength
|
||||||
, either (error "finalize: internal error") id $ P.fill 16 (P.putStorable (LE aadLength) >> P.putStorable (LE plainLength))
|
, either (error "finalize: internal error") id $ P.fill 16 (P.putStorable (toLE aadLength) >> P.putStorable (toLE plainLength))
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user