Java Method That works like MySQL function AES_ENCRYPT

Web, Mobile & Software Dev Other - Software Development Posted 2 years ago

Fixed Price

Budget: $30
Delivery by July 31, 2014

Start Date

July 22, 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:

Activity on this Job

Last Viewed by Client: 2 years ago

Invites Sent: 0

Unanswered Invites: 0

Hired: 1

About the Client

(4.72) 43 reviews

New Zealand
Auckland 07:16 AM

91 Jobs Posted
75% Hire Rate, 1 Open Job

Over $10,000 Total Spent
70 Hires, 8 Active

$8.87/hr Avg Hourly Rate Paid
1,317 Hours

Member Since Mar 24, 2012