Renci.SshNet.Common.HostKeyEventArgs.HostKeyEventArgs C# (CSharp) Method

HostKeyEventArgs() public method

Initializes a new instance of the HostKeyEventArgs class.
public HostKeyEventArgs ( KeyHostAlgorithm host ) : System
host Renci.SshNet.Security.KeyHostAlgorithm The host.
return System
        public HostKeyEventArgs(KeyHostAlgorithm host)
        {
            CanTrust = true;   //  Set default value

            HostKey = host.Data;

            HostKeyName = host.Name;

            KeyLength = host.Key.KeyLength;

            using (var md5 = CryptoAbstraction.CreateMD5())
            {
                FingerPrint = md5.ComputeHash(host.Data);
            }
        }
    }
HostKeyEventArgs