Spent the day struggling with getting AES/CBC/PCKS#5 encryption for SagePay Forms Protocol 3.00
Helpfully the SagePay .Net integration kit's functions for encryption are in a compiled DLL which makes the kit next to useless for understanding how the encryption needs to work.
After many many attempts to get the encryption right I keep running into this error with SagePay:
"5068: The encryption method is not supported by this protocol version"
Anyone who has some working encryption / decryption functions that work with SagePay for Protocol 3.00 using AES/CBC/PCKS#5 I'd really appreciate them, as I'm sure many others would too...
Thanks
So after a fair bit of reading and looking through loads of examples that don't work I have a solution in vb.net - I hope this works for someone else too:
To Encrypt For SagePay
To Decrypt
Hope that helps someone out there, this almost drove me mad today!