Exemplo n.º 1
0
 static public FileHash ComputeHash(
     byte[] data,
     string hashType = CryptUtilities.DefaultHashType)
 {
     return(new FileHash(
                CryptUtilities.ComputeHash(data, hashType),
                hashType));
 }
Exemplo n.º 2
0
 static public FileHash ComputeHash(
     Stream stream,
     string hashType = CryptUtilities.DefaultHashType)
 {
     return(new FileHash(
                CryptUtilities.ComputeHash(stream, hashType),
                hashType));
 }
Exemplo n.º 3
0
        // Static

        static public FileHash ComputeHash(
            FileInfo file,
            string hashType = CryptUtilities.DefaultHashType)
        {
            return(new FileHash(
                       CryptUtilities.ComputeHash(file, hashType),
                       hashType));
        }