iTextSharp.text.pdf.security.PrivateKeySignature.PrivateKeySignature C# (CSharp) Method

PrivateKeySignature() public method

public PrivateKeySignature ( ICipherParameters pk, String hashAlgorithm ) : System
pk ICipherParameters
hashAlgorithm String
return System
        public PrivateKeySignature(ICipherParameters pk, String hashAlgorithm)
        {
            this.pk = pk;
            this.hashAlgorithm = DigestAlgorithms.GetDigest(DigestAlgorithms.GetAllowedDigests(hashAlgorithm));
            if (pk is RsaKeyParameters)
                encryptionAlgorithm = "RSA";
            else if (pk is DsaKeyParameters)
                encryptionAlgorithm = "DSA";
            else if (pk is ECKeyParameters)
                encryptionAlgorithm = "ECDSA";
            else
                throw new ArgumentException(MessageLocalization.GetComposedMessage("unknown.key.algorithm.1", pk.ToString()));
        }