public void TestGermanCharsDecryptionMiniJson() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); string message = "stpgsG1DZZxb44J7mFNSzg=="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeMiniJson <string> (decrypted); Assert.True(("ÜÖ").Equals(message)); }
public void TestPubNubDecryption1MiniJson() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //deserialized string string message = "f42pIQcWZ9zbTbH8cyLwByD/GsviOE0vcREIEVPARR0="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeMiniJson <string> (decrypted); Assert.True(("Pubnub Messaging API 1").Equals(message)); }
public void TestUnicodeCharsDecryptionMiniJson() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); string message = "+BY5/miAA8aeuhVl4d13Kg=="; //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize message = Common.DeserializeMiniJson <string> (decrypted); Assert.True(("漢語").Equals(message)); }
public void TestPubNubDecryption2MiniJson() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //Deserialized string string message = "f42pIQcWZ9zbTbH8cyLwB/tdvRxjFLOYcBNMVKeHS54="; //Decrypt string decrypted = pubnubCrypto.Decrypt(message); //Deserialize message = Common.DeserializeMiniJson <string> (decrypted); Assert.True(("Pubnub Messaging API 2").Equals(message)); }
public void TestYayDecryptionMiniJson() { PubnubCrypto pubnubCrypto = new PubnubCrypto("enigma"); //Non deserialized string string message = "\"Wi24KS4pcTzvyuGOHubiXg==\""; //Deserialize message = Common.DeserializeMiniJson <string> (message); //decrypt string decrypted = pubnubCrypto.Decrypt(message); //deserialize again message = Common.DeserializeMiniJson <string> (decrypted); Assert.True(("yay!").Equals(message)); }