0

Hi, I'm using the encryption module (AES3) and when encrypting a value I get an encrypted value that consists of 51 digits (including {AES3}). Can someone explain this, since I thought the output would always be a multiple of 16. For example: Encrypting the value 1932 using this testkey hPe*uhKGjJUbX^1^U9W!0$7E*Kkfck3M results in a very long value

asked

Yordee van Eijk

2 answers

0

The {AES3} part is used as a prefix, so that doesn’t count. The remainder is a base64 encoded string containing the encrypted value. When you base64-decode that part, you end up with the actual AES encrypted value and if you’re right it’s length should be divisible by 16. I’m not familiar with these encryption methods, so I’m not sure about the math, but at least you should consider the fact that the value is base64 encoded on top of being encrypted.

answered

Martin Koelewijn

0

Hi there!

Probably this question is outdated, but I ran into the same question as developing api endpoint to a mendix app.

As per the java code I saw in mendix module it is concatenating:

- prefix({AES3})

- base64 encoded iv (initial vector used for encryption)

- semicolon ";"

- base64 encoded encrypted value

Hope this helps future devs!

Regards

answered

Gábor Molnár