C# get md5 from bytes
程序员文章站
2022-04-29 13:52:55
static byte[] GetBytesFromDic(Dictionary dic) { if(dic==null || !dic.Any()) { return null; } using (MemoryStream ms = new MemoryStream(... ......
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; } }
上一篇: 神奇的PERL-第六个任务(1)