Exemple #1
0
 public static byte[] ToHash <T>(this FileInfo input) where T : HashAlgorithm
 => HashUtily.Calculate <T>(input, HashFlag.HashFile);
Exemple #2
0
 public static byte[] ToHash <T>(this string input) where T : HashAlgorithm
 => HashUtily.Calculate <T>(input, HashFlag.HashString);
Exemple #3
0
 public static byte[] ToHash(this string input)
 => HashUtily.Calculate <MD5>(input, HashFlag.HashString);
Exemple #4
0
 public static byte[] ToHash <T>(this object input, bool isFile = false) where T : HashAlgorithm
 => HashUtily.Calculate <T>(input, isFile ? HashFlag.HashFile : HashFlag.HashString);