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)); }
public void encryptRSATest() { rsa.RSA rsaAlgo = new rsa.RSA(); BigInteger encrypted = rsaAlgo.encrypt(Encoding.UTF8.GetBytes("SECURITY")); Assert.IsNotNull(encrypted); }