public void TestGermanCharsDecryptionJSONFx() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); string message = "stpgsG1DZZxb44J7mFNSzg=="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeUsingJSONFx <string>(decrypted); Assert.AreEqual("ÜÖ", message); }
public void TestPubNubDecryption1JSONFx() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //deserialized string string message = "f42pIQcWZ9zbTbH8cyLwByD/GsviOE0vcREIEVPARR0="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeUsingJSONFx <string>(decrypted); Assert.AreEqual("Pubnub Messaging API 1", message); }
public void TestUnicodeCharsDecryptionJSONFx() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); string message = "+BY5/miAA8aeuhVl4d13Kg=="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeUsingJSONFx <string>(decrypted); Assert.AreEqual("漢語", message); }
public void TestPubNubDecryption2JSONFx() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //Deserialized string string message = "f42pIQcWZ9zbTbH8cyLwB/tdvRxjFLOYcBNMVKeHS54="; //Decrypt string decrypted = pubnubCrypto.Decrypt(message); //Deserialize message = Common.DeserializeUsingJSONFx <string>(decrypted); Assert.AreEqual("Pubnub Messaging API 2", message); }
public void TestYayDecryptionJSONFx() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //Non deserialized string string message = "\"Wi24KS4pcTzvyuGOHubiXg==\""; //Deserialize message = Common.DeserializeUsingJSONFx <string>(message); //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize again message = Common.DeserializeUsingJSONFx <string>(decrypted); Assert.AreEqual("yay!", message); }