Example #1
0
 public static Byte[] GetHashBytes64(this Object obj)
 {
     if (obj is ValueType)
     {
         return(GetValueTypeHashBytes64(obj));
     }
     if (obj is string)
     {
         return((((string)obj)).GetHashBytes64());
     }
     if (obj is IList)
     {
         return(GetHashBytes64((IList)obj));
     }
     return(HashHandle64.ComputeHash(obj.GetBytes()));
 }
Example #2
0
 public static Byte[] GetHashBytes64(this Byte[] bytes)
 {
     return(HashHandle64.ComputeHash(bytes));
 }
Example #3
0
 public static Byte[] GetHashBytes64(this String obj)
 {
     fixed(char *c = obj)
     return(HashHandle64.ComputeHash((byte *)c, obj.Length * sizeof(char), 0));
 }
Example #4
0
 public static Byte[] GetHashBytes64(this IList obj)
 {
     return(HashHandle64.ComputeHash(obj.GetBytes()));
 }
Example #5
0
 public override unsafe Byte[] ComputeHash(byte[] bytes)
 {
     return(HashHandle64.ComputeHash(bytes));
 }
Example #6
0
 public override unsafe Byte[] ComputeHash(byte *bytes, int length, uint seed = 0)
 {
     return(HashHandle64.ComputeHash(bytes, length, 0));
 }