Ejemplo n.º 1
0
 public void decryptRSATest()
 {
     rsa.RSA rsaAlgo = new rsa.RSA();
     BigInteger encrypted = rsaAlgo.encrypt(Encoding.UTF8.GetBytes("ASD"));
     BigInteger security = new BigInteger(Encoding.UTF8.GetBytes("ASD"));
     Assert.AreEqual(security, rsaAlgo.decrypt(encrypted));
 }
Ejemplo n.º 2
0
 public void encryptRSATest()
 {
     rsa.RSA rsaAlgo = new rsa.RSA();
     BigInteger encrypted = rsaAlgo.encrypt(Encoding.UTF8.GetBytes("SECURITY"));
     Assert.IsNotNull(encrypted);
 }