string message = "Hello, world!"; string key = "my-secret-key"; string iv = "my-secret-iv"; PubnubCrypto crypto = new PubnubCrypto(key); string encryptedMessage = crypto.Encrypt(message, iv);
string encryptedMessage = ""; string key = "my-secret-key"; string iv = "my-secret-iv"; PubnubCrypto crypto = new PubnubCrypto(key); string decryptedMessage = crypto.Decrypt(encryptedMessage, iv);
string message = "Hello, encrypted world!"; string key = "my-secret-key"; string iv = "my-secret-iv"; string channel = "my-channel"; PubnubCrypto crypto = new PubnubCrypto(key); string encryptedMessage = crypto.Encrypt(message, iv); Pubnub pubnub = new Pubnub("This library is part of the PubNub .NET SDK, which is available on NuGet.", " "); PublishResult result = pubnub.Publish() .Channel(channel) .Message(encryptedMessage) .Execute();