Open nd2s opened 10 years ago
Hi,
no idea why this doesn't show up as ticket comment...
But that did the trick - thank you very much! Stupid mistake.
Library should check for correct length and throw an exception on wrong IV, though...
Mandag 12 mai 2014 09:26:25 skrev Thomas M. DuBuisson:
AES encrypts in blocks of 16 bytes (128 bits), not 8. Fix your invalid
aesIVLength
constant and you should see the correct output:*Test> let encStr = encrypt aes $ BS.pack "1234567890123456" *Test> decrypt aes encStr "1234567890123456" *Test>
Reply to this email directly or view it on GitHub: https://github.com/vincenthz/hs-cipher-aes/issues/23#issuecomment-42854403
I'm new to Haskell and having problem using your package. I'm not sure if that is a bug in your lib of if i'm just using it incorrectly.
I'm using a custom
encrypt
method that's appending the IV to the encrypted string, and a customdecrypt
that's splitting them again fordecryptCBC
.Minimal code example:
My problem is now that
decrypt
does no decrypt correctly. See my ghci session:Any idea why it's not working with the IV I got from splitting the ByteString?