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.7.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
30
31
32
# File 'lib/strongbox.rb', line 27

def included base #:nodoc:
  base.extend ClassMethods
  if base.respond_to?(:class_attribute)
    base.class_attribute :lock_options
  end
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,
    :symmetric_cipher => 'aes-256-cbc',
    :ensure_required_columns => true
  }
end