private static String transformPasswordToHex(byte[] array) throws NoSuchAlgorithmException
    {
        BigInteger bigInteger = new BigInteger(1, array);
        String hexValue = bigInteger.toString(16);
        int paddingLength = (array.length * 2) - hexValue.length();
        if(paddingLength > 0)
        {
            return String.format("%0"  + paddingLength + "d", 0) + hexValue;
        }else{
            return hexValue;
        }
    }