예제 #1
0
 public static Byte[] GetHashBytes32(this Object obj)
 {
     if (obj is ValueType)
     {
         return(GetValueTypeHashBytes32(obj));
     }
     if (obj is string)
     {
         return((((string)obj)).GetHashBytes32());
     }
     if (obj is IList)
     {
         return(GetHashBytes32((IList)obj));
     }
     return(HashHandle32.ComputeHash(obj.GetBytes()));
 }
예제 #2
0
 public static Byte[] GetHashBytes32(this String obj)
 {
     fixed(char *c = obj)
     return(HashHandle32.ComputeHash((byte *)c, obj.Length * sizeof(char), 0));
 }
예제 #3
0
 public static Byte[] GetHashBytes32(this IList obj)
 {
     return(HashHandle32.ComputeHash(obj.GetBytes()));
 }
예제 #4
0
 public static Byte[] GetHashBytes32(this Byte[] bytes)
 {
     return(HashHandle32.ComputeHash(bytes));
 }