Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add strict_mode documentation

  • Loading branch information...
commit c94700039c470e9cbb034661788057eb2359bd7a 1 parent 85ba362
Dan Buettner authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/crypt_keeper/provider/aes.rb
8 lib/crypt_keeper/provider/aes.rb
@@ -13,12 +13,16 @@ class Aes
# Public: An instance of OpenSSL::Cipher::Cipher
attr_accessor :aes
- # Public: Whether blank string is accepted as data for encryption
+ # Public: When true (default), blank string is not accepted as data for encryption
attr_accessor :strict_mode
# Public: Initializes the class
- # options - A hash of options. :key is required
+ # options - A hash of options.
+ # :key is required
+ # :strict_mode can be true or false; true is the default
+ # when true, encryting or decrypting an empty string will raise an exception
+ # when false an empty string will be accepted (but will not be encrypted; will be returned as empty string)
def initialize(options = {})
@aes ="AES-256-CBC")
@aes.padding = 1
Please sign in to comment.
Something went wrong with that request. Please try again.