Esempio n. 1
0
        /// <summary>
        /// Generate digest. The digest can be reused.
        /// </summary>
        /// <param name="parameters">Parameters.</param>
        /// <returns></returns>
        /// <exception cref="Exception"/>
        public IMac GenerateDigest(ICipherParameters parameters)
        {
            IMac digest = new HMac(_hashAlgorithm.GenerateDigest());

            digest.Init(parameters);
            return(digest);
        }
Esempio n. 2
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithm.GenerateDigest();

            return(new Iso9796d2Signer(new RsaBlindedEngine(), digest, true));
        }
Esempio n. 3
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithm.GenerateDigest();

            return(new Gost3410DigestSigner(new Gost3410Signer(), digest));
        }
Esempio n. 4
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithm.GenerateDigest();

            return(_identifier is null ? new RsaDigestSigner(digest) : new RsaDigestSigner(digest, _identifier));
        }
Esempio n. 5
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithm.GenerateDigest();

            return(new DsaDigestSigner(new ECDsaSigner(), digest, PlainDsaEncoding.Instance));
        }
Esempio n. 6
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithm.GenerateDigest();

            return(new SM2Signer(digest));
        }
Esempio n. 7
0
        private protected override ISigner GenerateSigner()
        {
            IDigest digest = _hashAlgorithMgf.GenerateDigest();

            return(new PssSigner(new RsaBlindedEngine(), digest));
        }