.NET Framework                
            Trabajar con SHA1 en C #
        
        
            
    Buscar..
Introducción
En este proyecto, verá cómo trabajar con la función de hash criptográfico SHA1. por ejemplo, obtener hash de la cadena y cómo romper el hash SHA1. fuente en git hub: https://github.com/mahdiabasi/SHA1Tool
#Generar suma de comprobación SHA1 de una función de archivo
Primero agregue System.Security.Cryptography y System.IO a su proyecto
 public string GetSha1Hash(string filePath)
    {
        using (FileStream fs = File.OpenRead(filePath))
        {
            SHA1 sha = new SHA1Managed();
            return BitConverter.ToString(sha.ComputeHash(fs));
        }
    }
    
    
    
    
    Modified text is an extract of the original Stack Overflow Documentation
        Licenciado bajo CC BY-SA 3.0
        No afiliado a Stack Overflow