- java 1.8 over
##Build locally with encrypt
- java -jar jasypt-1.9.2.jar org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI input=world password=ncsoft algorithm=PBEWITHSHA256AND128BITAES-CBC-BC
If you encounter issues message "java.security.NoSuchProviderException: no such provider: BC" check below
-
Check that the java home is set in the configuration
-
Check which java environment is used for application
-
Check that \jre\lib\security\java.security has bouncycastle provider entry. i.e. security.provider.9=org.bouncycastle.jce.provider.BouncyCastleProvider
-
Also check that bouncy castle jar is added to \jre\lib\ext\ bcprov-jdk15on-147.jar (latest one to work for java 1.5 & 1.6
Jasypt uses an StringEncryptor
to decrypt properties. For all 3 methods, if no custom StringEncryptor
is found in the Spring Context, one is created automatically that can be configured through the following properties (System, properties file, command line arguments, environment variable, etc.):
Key | Required | Default Value |
jasypt.encryptor.password | True | - |
jasypt.encryptor.algorithm | False | PBEWithMD5AndDES |
jasypt.encryptor.keyObtentionIterations | False | 1000 |
jasypt.encryptor.poolSize | False | 1 |
jasypt.encryptor.providerName | False | SunJCE |
jasypt.encryptor.saltGeneratorClassname | False | org.jasypt.salt.RandomSaltGenerator |
jasypt.encryptor.stringOutputType | False | base64 |
jasypt.encryptor.proxyPropertySources | False | false |