VerifyWithSHA1() public method

public VerifyWithSHA1 ( byte data, byte expected ) : void
data byte
expected byte
return void
コード例 #1
0
ファイル: SSH2Connection.cs プロジェクト: nospy/EasyConnect
        private void VerifyHostKeyByRSA(SSH2DataReader pubkey, byte[] sigbody, byte[] hash)
        {
            BigInteger exp = pubkey.ReadMPInt();
            BigInteger mod = pubkey.ReadMPInt();
            Debug.Assert(pubkey.Rest==0);

            //Debug.WriteLine(exp.ToHexString());
            //Debug.WriteLine(mod.ToHexString());

            RSAPublicKey pk = new RSAPublicKey(exp, mod);
            pk.VerifyWithSHA1(sigbody, new SHA1CryptoServiceProvider().ComputeHash(hash));
            _cInfo._hostkey = pk;
        }