spikex-strongbox 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +2 -2
- data/lib/strongbox/lock.rb +1 -1
- data/lib/strongbox.rb +1 -1
- metadata +1 -1
data/README.textile
CHANGED
@@ -109,8 +109,8 @@ For example, encrypting a small attribute, providing only the public key for ext
|
|
109
109
|
security, and Base64 encoding the encrypted data:
|
110
110
|
|
111
111
|
class User < ActiveRecord::Base
|
112
|
-
validates_length_of :pin_code,
|
113
|
-
encrypt_with_public_key :pin_code,
|
112
|
+
validates_length_of :pin_code, :is => 4
|
113
|
+
encrypt_with_public_key :pin_code,
|
114
114
|
:symmetric => :never
|
115
115
|
:base64 => true
|
116
116
|
:public_key => File.join(RAILS_ROOT,'config','public.pem'),
|
data/lib/strongbox/lock.rb
CHANGED
@@ -56,7 +56,7 @@ module Strongbox
|
|
56
56
|
return "*encrypted*" if password.blank?
|
57
57
|
|
58
58
|
unless @private_key
|
59
|
-
raise StrongboxError.new("#{@instance.class} model does not have
|
59
|
+
raise StrongboxError.new("#{@instance.class} model does not have private key_file")
|
60
60
|
end
|
61
61
|
|
62
62
|
ciphertext = @instance.read_attribute(@name)
|
data/lib/strongbox.rb
CHANGED