You are not logged in.
Pages: 1
Hi,
I have not found how to do this with mORMot. A simple example would be useful if somebody has one.
Any quick solution outside mORMot is welcome too.
Offline
First note: ECB block chaining is not secure. You should better use another mode, like OFB which is optimized in speed in our framework.
Second note: you need to consider which padding you want to use, because AES works on whole 16 bytes blocks.
So you can use SynCrypto.pas and TAESECB.EncryptPKCS7().
Online
I am aware of the weakness, but thanks for the warning. This is something from an outside source.
The string's length is 87.
I have already tried DecryptPKCS7Buffer with TAESECB and TAESECB_API yesterday but I got "Invalid input length."
I figured that copy-pasting an example would be least time consuming help.
Last edited by Leslie7 (2021-01-29 10:08:53)
Offline
Yes, of course.
Unfortunately this info is not in the documentation currently available. "No info" suggests to me that it is probably the most basic/standardish/frequently used option. I assume there are things I could try.
Last edited by Leslie7 (2021-01-29 11:19:53)
Offline
The problem was something else: after base64 decoding first TAESECB.DecryptPKCS7 works PERFECTLY.:)
Last edited by Leslie7 (2021-01-29 20:53:35)
Offline
Pages: 1