-
Jul 22nd, 2010, 08:02 AM
#1
Password encryption
I have a requirement where I need to encrypt the database password
I define my Database credentials (DB URL, USER NAME & PASSWORD )in a .properties file.
#######
PROPERTY FILE
DB_USERNAME=abcd
DB_PASSWORD=test
I use ant to generate xml
##############
XML FILE
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close" autowire="byName">
<property name="driverClassName">
<value>com.ibm.db2.jcc.DB2Driver</value>
</property>
<property name="url">
<value>@DB_CONNECTION_URL@</value>
</property>
<property name="username">
<value>@DB_USERNAME@</value>
</property>
<property name="password">
<value>@DB_PASSWORD@</value>
</property>
</bean>
Output of this ant target is an xml which contains the value of DB USER NAME, PASSWORD etc.
Now I want to get this password in encrypted form, to the generated xml...
Please suggest how should I go for password encryption.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules