/// <summary> /// Constructs the decorator with the specified implementations of <see cref="ISendMessages"/> and <see cref="IReceiveMessages"/>, /// storing the specified base 64-encoded key to be used when encrypting/decrypting messages /// </summary> public RijndaelEncryptionTransportDecorator(ISendMessages innerSendMessages, IReceiveMessages innerReceiveMessages, string keyBase64) { this.innerSendMessages = innerSendMessages; this.innerReceiveMessages = innerReceiveMessages; helper = new RijndaelHelper(keyBase64); }
/// <summary> /// Static helper that can be used to generate a brand-spanking-new base 64-encoded encryption key /// </summary> public static string GenerateKeyBase64() { return(RijndaelHelper.GenerateNewKey()); }
public RijndaelEncryptionTransportDecorator(ISendMessages innerSendMessages, IReceiveMessages innerReceiveMessages, string keyBase64) { this.innerSendMessages = innerSendMessages; this.innerReceiveMessages = innerReceiveMessages; helper = new RijndaelHelper(keyBase64); }
/// <summary> /// Configures the encryption decorator to actually encrypt messages using the specified key /// </summary> public EncryptionAndCompressionTransportDecorator EnableEncryption(string keyBase64) { encryptionHelper = new RijndaelHelper(keyBase64); return this; }
protected override void DoSetUp() { helper = new RijndaelHelper(RijndaelHelper.GenerateNewKey()); }
/// <summary> /// Configures the encryption decorator to actually encrypt messages using the specified key /// </summary> public EncryptionAndCompressionTransportDecorator EnableEncryption(string keyBase64) { encryptionHelper = new RijndaelHelper(keyBase64); return(this); }