Class: EncryptedCookieStore::EncryptedCookieStore
- Inherits:
-
ActionDispatch::Session::CookieStore
- Object
- ActionDispatch::Session::CookieStore
- EncryptedCookieStore::EncryptedCookieStore
- Includes:
- EncryptedCookieStoreConstants
- Defined in:
- lib/encrypted_cookie_store/encrypted_cookie_store.rb
Defined Under Namespace
Classes: MessageVerifier
Constant Summary collapse
- OpenSSLCipherError =
OpenSSL::Cipher.const_defined?(:CipherError) ? OpenSSL::Cipher::CipherError : OpenSSL::CipherError
Constants included from EncryptedCookieStoreConstants
EncryptedCookieStoreConstants::ENCRYPTION_KEY_SIZE
Class Attribute Summary collapse
-
.data_cipher_type ⇒ Object
Returns the value of attribute data_cipher_type.
-
.iv_cipher_type ⇒ Object
Returns the value of attribute iv_cipher_type.
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ EncryptedCookieStore
constructor
A new instance of EncryptedCookieStore.
Constructor Details
#initialize(app, options = {}) ⇒ EncryptedCookieStore
Returns a new instance of EncryptedCookieStore.
17 18 19 20 21 22 23 |
# File 'lib/encrypted_cookie_store/encrypted_cookie_store.rb', line 17 def initialize(app, = {}) ensure_encryption_key_secure([:encryption_key]) @encryption_key = unhex([:encryption_key]).freeze @iv_cipher = OpenSSL::Cipher::Cipher.new(EncryptedCookieStore.iv_cipher_type) @data_cipher = OpenSSL::Cipher::Cipher.new(EncryptedCookieStore.data_cipher_type) super(app, ) end |
Class Attribute Details
.data_cipher_type ⇒ Object
Returns the value of attribute data_cipher_type.
11 12 13 |
# File 'lib/encrypted_cookie_store/encrypted_cookie_store.rb', line 11 def data_cipher_type @data_cipher_type end |
.iv_cipher_type ⇒ Object
Returns the value of attribute iv_cipher_type.
10 11 12 |
# File 'lib/encrypted_cookie_store/encrypted_cookie_store.rb', line 10 def iv_cipher_type @iv_cipher_type end |