Skip to content

ghostflare76/spring-boot-jasypt-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Requirement

  • 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

Issue

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

Encryption Configuration

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.):

KeyRequiredDefault Value
jasypt.encryptor.passwordTrue -
jasypt.encryptor.algorithmFalsePBEWithMD5AndDES
jasypt.encryptor.keyObtentionIterationsFalse1000
jasypt.encryptor.poolSizeFalse1
jasypt.encryptor.providerNameFalseSunJCE
jasypt.encryptor.saltGeneratorClassnameFalseorg.jasypt.salt.RandomSaltGenerator
jasypt.encryptor.stringOutputTypeFalsebase64
jasypt.encryptor.proxyPropertySourcesFalsefalse

About

spring-boot-jasypt-sample

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages