Currently running SonarQube 10.0 and have a question on Encryption (Administration, Configuration, Encryption). When I encrypt a number (say 123456) it encrypts to a 40 or so character value, and if I hit the Encrypt button again with the same number (123456) I get a different encrypted number than what I got the first time. Also, if I hit encrypt 10 times, I get 10 different numbers. Is the encryption supposed to work that way (different encryption)?

I think you may be confusing the concept of hashing with encryption.

Indeed – **hashing** the same value twice should result in the same output. This is useful for things like validating that a file is the exact same between two filesystems (because they result in the same hash when put through a hashing algorithm).

[Encryption on the other hand…](encryption - Doesn't the same string encrypted with the same key generate the same encrypted value? - Information Security Stack Exchange

Most encryption schemes are designed so that encrypting the same value twice generates different encrypted values. This is a security property.

Encryption schemes such that encrypting the same value twice results in the same ciphertext are said to be deterministic. Deterministic encryption is necessary in some applications, but should be avoided by default.