Ejemplo n.º 1
0
        public DecryptionResult Decrypt(BigInteger cipherText, PrivateKeyBase privKey, PublicKey pubKey)
        {
            if (cipherText <= 1 || cipherText >= pubKey.N - 1)
            {
                return(new DecryptionResult("Ciphertext too long"));
            }

            return(new DecryptionResult(privKey.AcceptDecrypt(_visitor, cipherText, pubKey)));
        }
Ejemplo n.º 2
0
 public ISignatureBuilder WithKey(KeyPair key)
 {
     _publicKey  = key.PubKey;
     _privateKey = key.PrivKey;
     return(this);
 }
Ejemplo n.º 3
0
 public ISignatureBuilder WithPrivateKey(PrivateKeyBase privKey)
 {
     _privateKey = privKey;
     return(this);
 }