java - Jasypt: Encrypt Multiple Passwords in Configuration File -


i've seen multiple tutorials explain using jaspyt spring explaining how encrypt property value, use 1 value!

what if have 2 or more passwords want encrypt?

here's have far. how have multiple encrypted properties jasypt?

tomcat setenv.sh set system properties

1 catalina_opts="-dtarget_env=local" 2 catalina_opts="$catalina_opts -dpwdone=my_pwd_one" 3 catalina_opts="$catalina_opts -dpwdtwo=my_pwd_two" 4 ... 

spring applicationcontext.xml

    <!-- passowrd encryption how add multiple encrypted passwords???-->     <bean id="environmentvariablesconfiguration" class="org.jasypt.encryption.pbe.config.environmentstringpbeconfig">         <property name="algorithm" value="pbewithmd5anddes" />         <property name="passwordsyspropertyname" value="pwdone" /> ??????pwdtwo??????     </bean>     <encryption:string-encryptor config-bean="environmentvariablesconfiguration" id="stringenc"/> 

i used encrypt executable create hash:

./encrypt.sh input=pwdone password=my_pwd_one 

...and used result in application.properties

com.mycompany.pwdone = enc(xj9tbhnuiiiddlng3mcbja==) 

...but other properties?

com.mycompany.pwdtwo = ... 


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -