CryptoHelper.GetMd5ByteArrayString C# (CSharp) Method

GetMd5ByteArrayString() public static method

public static GetMd5ByteArrayString ( String instr ) : byte[]
instr String
return byte[]
    public static byte[] GetMd5ByteArrayString(String instr)
    {
        byte[] data;

        lock (md5Hasher)
        {
            try
            {
                // Convert the input string to a byte array and compute the hash.
                data = md5Hasher.ComputeHash(utf8Encoding.GetBytes(instr));
            }
            catch (Exception)
            {
                return null;
            }
        }
        // Create a new Stringbuilder to collect the bytes
        // and create a string.
        //StringBuilder sBuilder = new StringBuilder();

        return data;
    }