-2

While using Jasypt, the encrypted passwords contains = (equal character) at the end. Is it guaranteed that the encrypted passwords will always have = at the end? How/Can we control this behavior?

Foe example: test is encrypted to Nv4nMcuVwsvWVuYD7Av44Q==

RamValli
  • 4,389
  • 2
  • 33
  • 45

1 Answers1

1

It looks like the =s come from padding the Base64 representation of the encryption / hash output.

In that case, the answer is generally no, it won't necessarily end with "=".

However if the algorithm you're using produces constant-length output (e.g. if it uses hashing along the way), it might by a chance end up producing those "="s all the time - but there's no way of knowing that for sure unless you fully understand all steps the algorithm you're using performs.

Jiri Tousek
  • 12,211
  • 5
  • 29
  • 43