public void Smoke() { string result; using (IPkiCryptographyService srv = new RsaCryptographyService()) { result = srv.Encrypt(_forEncryption, PlainText); } string decryptedText; using (IPkiCryptographyService srv2 = new RsaCryptographyService()) { decryptedText = srv2.Decrypt(_forDecryption, result); } Assert.AreEqual(PlainText, decryptedText); }
static void Main(string[] args) { IAsymmetricCryptographyService ser = new RsaCryptographyService(); AsymmetricKeyPairGenerationResult keyPair = ser.GenerateAsymmetricKeys(); }