lib/active_crypto.rb in ezcrypto-0.2 vs lib/active_crypto.rb in ezcrypto-0.2.1
- old
+ new
@@ -123,9 +123,15 @@
def enter_password(password,salt="onetwothree")
set_session_key(EzCrypto::Key.with_password password, salt)
end
=begin rdoc
+Decodes the Base64 encoded key and uses it as it's session key
+=end
+ def set_encoded_key(enc)
+ set_session_key(EzCrypto::Key.decode(enc))
+ end
+=begin rdoc
Sets a session key for the object. This should be a EzCrypto::Key instance.
=end
def set_session_key(key)
Base.session_keys[session_key_id]=key
end