Dhanraj
Dhanraj

Reputation: 1302

What are the default values used for StandardPBEStringEncryptor class?

I gone through the following post. what are the default values used in StandardPBEStringEncryptor class i.e which algorithm,Salt generator,no of hashing,etc? Any Link providing all those values.

[[1]: Why set a password using jasypt when encrypting text?

Upvotes: 1

Views: 1032

Answers (1)

Ken Chan
Ken Chan

Reputation: 90527

Well sometimes source codes are the best documentation for this kind of problems. Jasypt 's source codes are easy to read and its javadoc is pretty good. By reading its source code from StandardPBEStringEncryptor#encrypt , I find the default values for the following settings :

  • SaltGenerator uses SHA1PRNG algorithm to generate secure random number.
  • Use PBEWithMD5AndDES for encryption algorithm
  • Number of hashing iterations applied for obtaining the encryption key 1000
  • The salt size is 8 bytes

Upvotes: 2

Related Questions