Class: Snowden::Configuration
- Inherits:
-
Object
- Object
- Snowden::Configuration
- Defined in:
- lib/snowden/configuration.rb
Overview
The object that holds all the configuration details for Snowden
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#cipher_spec ⇒ String
an OpenSSL cipher spec to use with Snowden.
-
#edit_distance ⇒ Integer
the size of the edit distance sets that are created when searching and storing strings.
-
#padding_byte_size ⇒ Integer
the amount of random padding to add to values stored in the index.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Sets up the configuration object.
Constructor Details
#initialize ⇒ Configuration
Sets up the configuration object
22 23 24 25 26 |
# File 'lib/snowden/configuration.rb', line 22 def initialize @edit_distance = 3 @cipher_spec = "AES-256-CBC" @padding_byte_size = 32 end |
Instance Attribute Details
#backend ⇒ Object
Returns the value of attribute backend.
19 20 21 |
# File 'lib/snowden/configuration.rb', line 19 def backend @backend end |
#cipher_spec ⇒ String
an OpenSSL cipher spec to use with Snowden. Defaults to “AES-256-CBC”.
18 19 20 |
# File 'lib/snowden/configuration.rb', line 18 def cipher_spec @cipher_spec end |
#edit_distance ⇒ Integer
the size of the edit distance sets that are created when searching and storing strings. See an example at: gist.github.com/samphippen/6621771. Defaults to 3.
18 19 20 |
# File 'lib/snowden/configuration.rb', line 18 def edit_distance @edit_distance end |
#padding_byte_size ⇒ Integer
the amount of random padding to add to values stored in the index. Defaults to 32. Change at your own risk. Never set to lower than 2 blocks if you’re using a block cipher.
18 19 20 |
# File 'lib/snowden/configuration.rb', line 18 def padding_byte_size @padding_byte_size end |