public static String encryptPassword(String userName, String password)
{
try
{
String key1 = "1jjejduuhjdjdHDUEHWHd3ehgfidhwh23hHJCRIOI4HDHDHFKHFD3dhdhrg2djsHSDFHFEDJGW";
String key2 = "r347djejDETahe3j%3jd*%%2DDE223fdhahfh%^@21hdhfhzhdDFQ3hH7eh32hdE#@sdqhqhde";
String key3 = "gwkjd@wjsdj2324shjsQWeh2dsGed/#21ssdEdhawehrcyzhzeje2#@SDajw2D2sjzahd3#dSa";
String str = key1 + userName + key2 + password + key3;
MessageDigest alg = MessageDigest.getInstance("MD5");
byte[] b = str.getBytes();
alg.reset();
alg.update(b);
byte[] hash = alg.digest();
String d = "";
for (int i = 0; i < hash.length; i++)
{
int v = hash[i] & 0xFF;
if (v < 16)
{
d += "0";
}
d += Integer.toString(v, 16).toUpperCase();
}
return d;
}
catch (NoSuchAlgorithmException e)
{
return null;
}
}