Here you can find the source of md5HashStringToByte(String hash)
Parameter | Description |
---|---|
hash | the hash to convert back to bytes |
public static byte[] md5HashStringToByte(String hash)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w w w .j a v a2s . c om*/ * Creates an MD5 byte array from the given MD5 hash. * * @param hash the hash to convert back to bytes * @return String value of the given bytes */ public static byte[] md5HashStringToByte(String hash) { byte[] buf = new byte[16]; int i = 0; while (hash.length() > 0) { buf[i++] = (byte) Integer.parseInt(hash.substring(0, 2), 16); hash = hash.substring(2); } return buf; } }