简体   繁体   English

StandardPBEStringEncryptor 类使用的默认值是什么?

[英]What are the default values used for StandardPBEStringEncryptor class?

I gone through the following post.我浏览了以下帖子。 what are the default values used in StandardPBEStringEncryptor class ie which algorithm,Salt generator,no of hashing,etc? StandardPBEStringEncryptor 类中使用的默认值是什么,即哪种算法、盐生成器、没有散列等? Any Link providing all those values.提供所有这些值的任何链接。

[[1]: Why set a password using jasypt when encrypting text? [[1]: 加密文本时为什么要使用jasypt设置密码?

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. Jasypt的源代码很容易阅读,而且它的 javadoc 非常好。 By reading its source code from StandardPBEStringEncryptor#encrypt , I find the default values for the following settings :通过从StandardPBEStringEncryptor#encrypt读取其源代码,我找到了以下设置的默认值:

  • SaltGenerator uses SHA1PRNG algorithm to generate secure random number. SaltGenerator使用SHA1PRNG算法来生成安全的随机数。
  • Use PBEWithMD5AndDES for encryption algorithm使用PBEWithMD5AndDES作为加密算法
  • Number of hashing iterations applied for obtaining the encryption key 1000用于获取加密密钥的哈希迭代次数1000
  • The salt size is 8 bytes盐大小为8个字节

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM