Java Method That works like MySQL function AES_ENCRYPT

Web, Mobile & Software Dev Other - Software Development Posted 1 year ago

Fixed Price

Delivery by July 31, 2014




We have a database that has a field "password" that contains an encrypted password:

hex(AES_ENCRYPT('password','password') )
member where id='themember'

The output of the above SQL is:

# hex(password), hex(AES_ENCRYPT('password','password') )
'70FB3363637D6484723610B7837BEE9B', '70FB3363637D6484723610B7837BEE9B'

If the password was "password" this would have been used to create the encrypted value:


We require a Java class we can use like this:


boolean AesEncryptHashUtils.isMatchedPassword(String encryptionKey, String hexEncryptedPassword, String clearTextPassword);


encryptionKey = the password in clear text. Used as the encryption key. e.g. "password"
hexEncryptedPassword = the password encrypted using itself as the key and then turned into a hex string. e.g. "70FB3363637D6484723610B7837BEE9B"
clearTextPassword = the password in clear text as entered by the user. e.g. "password"

The method returns true if the value in hexEncryptedPassword equals the value in clearTextPassword.

The job is to create a class that implements the AES_ENCRYPT logic in pure Java code (or libs that are part of Java 1.6 Standard)

  • Other Skills:

Client Activity on this Job

Last Viewed: 1 year ago

Hired: 1

About the Client

(4.75) 39 reviews

New Zealand
Auckland 08:45 PM

89 Jobs Posted
75% Hire Rate, 1 Open Job

Over $10,000 Total Spent
68 Hires, 11 Active

$8.79/hr Avg Hourly Rate Paid
1,229 Hours

Member Since Mar 24, 2012