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())); }
public static Byte[] GetHashBytes32(this String obj) { fixed(char *c = obj) return(HashHandle32.ComputeHash((byte *)c, obj.Length * sizeof(char), 0)); }
public static Byte[] GetHashBytes32(this IList obj) { return(HashHandle32.ComputeHash(obj.GetBytes())); }
public static Byte[] GetHashBytes32(this Byte[] bytes) { return(HashHandle32.ComputeHash(bytes)); }