Module: Strongbox

Defined in:
lib/strongbox.rb,
lib/strongbox/lock.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Lock, StrongboxError

Constant Summary collapse

VERSION =
"0.3.0"
RSA_PKCS1_PADDING =
OpenSSL::PKey::RSA::PKCS1_PADDING
RSA_SSLV23_PADDING =
OpenSSL::PKey::RSA::SSLV23_PADDING
RSA_NO_PADDING =
OpenSSL::PKey::RSA::NO_PADDING
RSA_PKCS1_OAEP_PADDING =
OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



27
28
29
# File 'lib/strongbox.rb', line 27

def included base #:nodoc:
  base.extend ClassMethods
end

.optionsObject

Provides for setting the default options for Strongbox



17
18
19
20
21
22
23
24
25
# File 'lib/strongbox.rb', line 17

def options
  @options ||= {
    :base64 => false,
    :symmetric => :always,
    :padding => RSA_PKCS1_PADDING,
    :encrypt_iv => true,
    :symmetric_cipher => 'aes-256-cbc'
  }
end