Java Method That works like MySQL function AES_ENCRYPT

Web, Mobile & Software Dev Other - Software Development Posted 10 months ago

Fixed Price

Delivery by July 31, 2014

$30.00

Budget

Details

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

select
hex(password),
hex(AES_ENCRYPT('password','password') )
from
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:

AES_ENCRYPT('password','password')

We require a Java class we can use like this:

AesEncryptHashUtils.isMatchedPassword("mypassword","encryptedbase64stringhere","mypassword");

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

Where:

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)

Skills Required:

Client Activity on this Job

Last Viewed: 9 months ago

Applicants: 21

Hired: 1

Other open jobs by this client (7)


About the Client

(4.76) 21 reviews

New Zealand
Auckland 04:32 AM

66 Jobs Posted
70% Hire Rate, 9 Open Jobs

$9,670 Total Spent
48 Hires, 18 Active

$8.05/hr Avg Hourly Rate Paid
712 Hours

Member Since Mar 24, 2012