public DigitalSignature Sign(string DATA_TO_ENCRYPT = "How are you") { // Encrypt with the certificate and decrypt with the combo pfx var signature = DigitalSignature.BuildSignedMessage(new X509Certificate2(_senderPrivatePublicPath), new X509Certificate2(_recieverPublicPath), DATA_TO_ENCRYPT); var untampered = X509Encryption.VerifySignature(new X509Certificate2(_senderPrivatePublicPath), signature.Cipher, signature.Signature); Assert.IsTrue(untampered); return(signature); }