/// <summary> /// Creates a /// <see cref="PrivateKeySignature"/> /// instance. /// </summary> /// <param name="pk"> /// A /// <see cref="Org.BouncyCastle.Crypto.ICipherParameters"/> /// object. /// </param> /// <param name="hashAlgorithm">A hash algorithm (e.g. "SHA-1", "SHA-256",...).</param> /// <param name="provider">A security provider (e.g. "BC").</param> public PrivateKeySignature(ICipherParameters pk, String hashAlgorithm) { this.pk = pk; this.hashAlgorithm = DigestAlgorithms.GetDigest(DigestAlgorithms.GetAllowedDigest(hashAlgorithm)); this.encryptionAlgorithm = SignUtils.GetPrivateKeyAlgorithm(pk); }