/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package util;

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 *
 * @author Ani
 */
public class ConvertPassword {

    public static String convertPassword(String password) throws NoSuchAlgorithmException, UnsupportedEncodingException{
         byte[] cPassword = null;
         
         MessageDigest md = MessageDigest.getInstance("MD5");
         md.update(("7AG8f3fb3gvn"+password+"Sha9Asl65KuM").getBytes("UTF-8"));
         cPassword = md.digest();
         md.update(cPassword);
         cPassword = md.digest();

        return new String(cPassword);
    }
}
