MD5.Create().ComputeHash(byte[] buffer,int offset,int count)
buffer为要加密的字符串转的byte[],具体可以Encoding.UTF8.GetBytes("password");
offset为buffer中的偏移位置,count为取多少长度(从偏移开始)进行md5加密,一般直接ComputeHash(Encoding.UTF8.GetBytes("password"))即可,不需要设置偏移。
6年前 32,181 0
MD5.Create().ComputeHash(byte[] buffer,int offset,int count)
buffer为要加密的字符串转的byte[],具体可以Encoding.UTF8.GetBytes("password");
offset为buffer中的偏移位置,count为取多少长度(从偏移开始)进行md5加密,一般直接ComputeHash(Encoding.UTF8.GetBytes("password"))即可,不需要设置偏移。
发表评论