The problem is that the C# AES throws an error if the data ends not on a 16 byte boundary
So I have to pad it with something.
Unfortunately I don't padded the PB AES stuff (manually), so I'm not able at the moment to decode this.
@Bernd
Primary you should ever use AES with a 16 byte padding, ever, never without.
A padding can are very different, the simplest are zero bytes, but all other bytes are available.
The used bytes for the padding change the encrypted block absolutelly.
One other bit in the padding and you can not decrypt this block.
The PB documentation treats AES only superficially.
The use of AES by users therefore often resembles a chaos.
Even the inventor of AES saw these problems.
He said it's not good to leave it to the developers how they want to implement AES.
He wanted to offer a solution in the future, as far as I know...
It is simply not good if there is no standardized way.
The problem you have there is nothing unusual.
It can take a lot of time and nerves.
There is no reason not to use zeros per se Bernd
You don't get a higher security if you don't use zeros
But often weird things are done because people think it would be safer