In the context of the question
I tried to apply it to my password encryption / decryption. But each time it returns different encrypted values for the same password. So how do I use the following code and jasypt configuration?
Def Defrag () {def jasyptConfig = grailsApplication.config.jasypt org.jasypt.encryption.pbe.StandardPBEStringEncryptor stringEncryptor = new org Jasypt.encryption.pbe.StandardPBEStringEncryptor (jasyptConfig) def Encrypted = String Encryption. Encryption (params.password)} jasypt {algorithm = "PBVISUS 256 and 256 BITES-CBC-BC" ProvisionName = "BC" password = "test" key specification = 1000
}
salt!
If you do not care, just set a ZeroSaltGenerator instance for your encryptor by default, this is RandomSaltGenerator, so the outputs are different.
Comments
Post a Comment