Base class for asymmetric cipher algorithms
Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HostAlgorithm"/> class.
        /// </summary>
        /// <param name="name">Host key name.</param>
        /// <param name="key">Host key.</param>
        /// <param name="data">Host key encoded data.</param>
        public KeyHostAlgorithm(string name, Key key, byte[] data)
            : base(name)
        {
            this.Key = key;

            var sshKey = new SshKeyData();
            sshKey.Load(data);
            this.Key.Public = sshKey.Keys;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyHostAlgorithm"/> class.
 /// </summary>
 /// <param name="name">Host key name.</param>
 /// <param name="key">Host key.</param>
 public KeyHostAlgorithm(string name, Key key)
     : base(name)
 {
     this.Key = key;
 }