예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DsaDigitalSignature" /> class.
        /// </summary>
        /// <param name="key">The DSA key.</param>
        /// <exception cref="System.ArgumentNullException">key</exception>
        public DsaDigitalSignature(DsaKey key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            this._key = key;

            this._hash = HashAlgorithmFactory.CreateSHA1();
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RsaDigitalSignature"/> class.
 /// </summary>
 /// <param name="rsaKey">The RSA key.</param>
 public RsaDigitalSignature(RsaKey rsaKey)
     : base(new ObjectIdentifier(1, 3, 14, 3, 2, 26), new RsaCipher(rsaKey))
 {
     _hash = HashAlgorithmFactory.CreateSHA1();
 }