public void decryptTest()
 {
     RSA target = new RSA(997, 1009);
     string ciphertext = "020574605831590890042003081208907080676758075536003944600637156066894402548070478377";
     string expected = "I had a fun time today.";
     string actual = target.decrypt(ciphertext);
     Assert.AreEqual(expected, actual);
     //string fun = target.decrypt("1 He, that being often reproved hardeneth his neck, shall suddenly be destroyed, and that without remedy. 2 When the righteous are in authority, the people rejoice: but when the wicked beareth rule, the people mourn. 3 Whoso loveth wisdom rejoiceth his father: but he that keepeth company with harlots spendeth his substance. 4 The king by judgment establisheth the land: but he that receiveth gifts overthroweth it. 5 A man that flattereth his neighbour spreadeth a net for his feet. 6 In the transgression of an evil man there is a snare: but the righteous doth sing and rejoice.");
 }
 public static string decrypt_message(long private_key, long remote_shared_key, string message)
 {
     RSA rsa = new RSA();
     rsa.setPrivateKey((ulong)private_key, (ulong)remote_shared_key);
     return rsa.decrypt(message);
 }
 public void encryptionConsistencyTest()
 {
     RSA target = new RSA(Primes.getPrime(), Primes.getPrime());
     string message = "asd, goga;=_hh1 He, that being often reproved hardeneth his neck, shall suddenly be destroyed, and that without remedy. 2 When the righteous are in authority, the people rejoice: but when the wicked beareth rule, the people mourn. 3 Whoso loveth wisdom rejoiceth his father: but he that keepeth company with harlots spendeth his substance. 4 The king by judgment establisheth the land: but he that receiveth gifts overthroweth it. 5 A man that flattereth his neighbour spreadeth a net for his feet. 6 In the transgression of an evil man there is a snare: but the righteous doth sing and rejoice.";// 7 The righteous considereth the cause of the poor: but the wicked regardeth not to know it. 8 Scornful men bring a city into a snare: but wise men turn away wrath. 9 If a wise man contendeth with a foolish man, whether he rage or laugh, there is no rest. 10 The bloodthirsty hate the upright: but the just seek his soul. 11 A fool uttereth all his mind: but a wise man keepeth it in till afterwards. 12 If a ruler hearken to lies, all his servants are wicked. 13 The poor and the deceitful man meet together: the LORD lighteneth both their eyes. 14 The king that faithfully judgeth the poor, his throne shall be established for ever. 15 The rod and reproof give wisdom: but a child left to himself bringeth his mother to shame. 16 When the wicked are multiplied, transgression increaseth: but the righteous shall see their fall. 17 Correct thy son, and he shall give thee rest; yea, he shall give delight unto thy soul. 18 Where there is no vision, the people perish: but he that keepeth the law, happy is he. 19 A servant will not be corrected by words: for though he understand he will not answer. 20 Seest thou a man that is hasty in his words? there is more hope of a fool than of him. 21 He that delicately bringeth up his servant from a child shall have him become his son at the length. 22 An angry man stirreth up strife, and a furious man aboundeth in transgression. 23 A man's pride shall bring him low: but honour shall uphold the humble in spirit. 24 Whoso is partner with a thief hateth his own soul: he heareth cursing, and bewrayeth it not. 25 The fear of man bringeth a snare: but whoso putteth his trust in the LORD shall be safe. 26 Many seek the ruler's favour; but every man's judgment cometh from the LORD. 27 An unjust man is an abomination to the just: and he that is upright in the way is abomination to the wicked.";
     string actual = target.decrypt(target.encrypt(message));
     Assert.AreEqual(message.Length, actual.Length);
     Assert.AreEqual(message, actual);
     //Assert.Inconclusive("Verify the correctness of this test method.");
 }