/// <summary> /// Initializes a new instance of the <see cref="CookieBasedSessions"/> class. /// </summary> /// <param name="encryptionProvider">The encryption provider.</param> /// <param name="passPhrase">The encryption pass phrase.</param> /// <param name="salt">The encryption salt.</param> /// <param name="sessionObjectFormatter">Session object formatter to use</param> public CookieBasedSessions(IEncryptionProvider encryptionProvider, string passPhrase, string salt, ISessionObjectFormatter sessionObjectFormatter) { this.encryptionProvider = encryptionProvider; this.passPhrase = passPhrase; this.salt = CreateSalt(salt); this.formatter = sessionObjectFormatter; }
/// <summary> /// Initializes a new instance of the <see cref="CookieBasedSessions"/> class. /// </summary> /// <param name="encryptionProvider">The encryption provider.</param> /// <param name="hmacProvider">The hmac provider</param> /// <param name="passPhrase">The encryption pass phrase.</param> /// <param name="salt">The encryption salt.</param> /// <param name="hmacPassphrase">The hmac passphrase</param> /// <param name="sessionObjectFormatter">Session object formatter to use</param> public CookieBasedSessions(IEncryptionProvider encryptionProvider, IHmacProvider hmacProvider, string passPhrase, string salt, string hmacPassphrase, ISessionObjectFormatter sessionObjectFormatter) { this.encryptionProvider = encryptionProvider; this.hmacProvider = hmacProvider; this.passPhrase = passPhrase; this.salt = CreateSalt(salt); this.hmacPassphrase = hmacPassphrase; this.formatter = sessionObjectFormatter; }
/// <summary> /// Using the specified formatter /// </summary> /// <param name="newFormatter">Formatter to use</param> public void WithFormatter(ISessionObjectFormatter newFormatter) { this.formatter = newFormatter; }
/// <summary> /// Initializes a new instance of the <see cref="CookieBasedSessions"/> class. /// </summary> /// <param name="encryptionProvider">The encryption provider.</param> /// <param name="hmacProvider">The hmac provider</param> /// <param name="sessionObjectFormatter">Session object formatter to use</param> public CookieBasedSessions(IEncryptionProvider encryptionProvider, IHmacProvider hmacProvider, ISessionObjectFormatter sessionObjectFormatter) { this.encryptionProvider = encryptionProvider; this.hmacProvider = hmacProvider; this.formatter = sessionObjectFormatter; }