protected virtual ISigner MakeSigner(IDigest d, bool forSigning, ICipherParameters cp)
        {
            ISigner s = new GenericSigner(new Pkcs1Encoding(new RsaBlindedEngine()), d);

            s.Init(forSigning, cp);
            return(s);
        }
Exemple #2
0
        public virtual ISigner CreateVerifyer(AsymmetricKeyParameter publicKey)
        {
            ISigner s = new GenericSigner(new Pkcs1Encoding(new RsaBlindedEngine()), new CombinedHash());

            s.Init(false, publicKey);
            return(s);
        }
        protected virtual ISigner MakeSigner(IDigest d, bool forSigning, ICipherParameters cp)
        {
            ISigner s = new GenericSigner(CreateRsaImpl(), d);

            s.Init(forSigning, cp);
            return(s);
        }
        public byte[] CalculateRawSignature(AsymmetricKeyParameter privateKey, byte[] md5andsha1)
        {
            ISigner sig = new GenericSigner(new Pkcs1Encoding(new RsaBlindedEngine()), new NullDigest());

            sig.Init(true, privateKey);
            sig.BlockUpdate(md5andsha1, 0, md5andsha1.Length);
            return(sig.GenerateSignature());
        }