Exemplo n.º 1
0
        private void generateSHA512(string inpath, string outpath)
        {
            FileStream fs       = File.OpenRead(inpath);
            SHA512     mySHA512 = SHA512.Create();

            byte[] retn = mySHA512.ComputeHash(fs);
            sha512File = new HashFile(ToHexString(retn), "sha512");
            fs.Close();
            sha512File.generateFile(outpath);
            sha512File.generateFile(outpath);
            sha512File.generateFile(outpath);
        }
Exemplo n.º 2
0
        private void generateSHA1(string inpath, string outpath)
        {
            FileStream  fs   = File.OpenRead(inpath);
            SHA1Managed sha1 = new SHA1Managed();

            byte[] retn = sha1.ComputeHash(fs);
            sha1File = new HashFile(ToHexString(retn), "sha1");
            fs.Close();
            sha1File.generateFile(outpath);
        }
Exemplo n.º 3
0
        private void generateMD5(string inpath, string outpath)
        {
            FileStream    fs            = File.OpenRead(inpath);
            HashAlgorithm hashAlgorithm = MD5.Create();

            byte[] retn = hashAlgorithm.ComputeHash(fs);
            md5File = new HashFile(ToHexString(retn), "md5");
            fs.Close();
            md5File.generateFile(outpath);
        }