C# get md5 from bytes
static byte[] GetBytesFromDic(Dictionary<string,string> dic) { if(dic==null || !dic.Any()) { return null; } using (MemoryStream ms = new MemoryStream()) { BinaryFormatter binFormatter = new BinaryFormatter(); binFormatter.Serialize(ms, dic); byte[] dicBytes = ms.ToArray(); return dicBytes; } }
赞 (0)