Module: ActiveCrypto::KeyHolder

### Home Classes Methods

### In Files

- lib/active_crypto.rb

### Methods

- #enter_password
- #session_key
- #set_encoded_key
- #set_session_key

### Files

- CHANGELOG
- README.rdoc
- README_ACTIVE_CRYPTO
- README_DIGITAL_SIGNATURES

### Class/Module Index

Quicksearch

- EzCrypto
- EzCrypto::Certificate
- EzCrypto::Digester
- EzCrypto::Key
- EzCrypto::Name
- EzCrypto::Signer
- EzCrypto::TrustStore
- EzCrypto::Verifier
- ActiveCrypto
- ActiveCrypto::AssociationKeyHolder
- ActiveCrypto::ClassMethods
- ActiveCrypto::Encrypted
- ActiveCrypto::Encrypted::ClassAccessors
- ActiveCrypto::KeyHolder
- ActiveCrypto::MissingKeyError

No matching classes.

# ActiveCrypto::KeyHolder

This module handles all standard key management features.

### Public Instance Methods

enter_password(password,salt="onetwothree") click to toggle source

Creates a key for object based on given password and an optional salt.

    # File lib/active_crypto.rb, line 127
    def enter_password(password,salt="onetwothree")
      set_session_key(EzCrypto::Key.with_password(password, salt))
    end

session_key() click to toggle source

Returns the session_key

    # File lib/active_crypto.rb, line 148
    def session_key
      @session_key
    end

set_encoded_key(enc) click to toggle source

Decodes the Base64 encoded key and uses it as it's session key

    # File lib/active_crypto.rb, line 134
    def set_encoded_key(enc)
      set_session_key(EzCrypto::Key.decode(enc))
    end

set_session_key(key) click to toggle source

Sets a session key for the object. This should be a EzCrypto::Key instance.

    # File lib/active_crypto.rb, line 140
    def set_session_key(key)
      @session_key=key
      self.decrypt_attributes if self.class.include? Encrypted
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.