plugins/adva_contact_mails/vendor/gems/ezcrypto-0.7.2/lib/active_crypto.rb
def encrypt(*attributes)        
      	include ActiveCrypto::Encrypted
      	before_save :encrypt_attributes
      	after_save :decrypt_attributes
        options=attributes.last.is_a?(Hash) ? attributes.pop : {}
        keyholder
        if options and options[:key]
  				module_eval <<-"end;"				 
  					def session_key
  						(send :#{options[:key]} ).send :session_key
  					end	 
  					@@external_key=true
  				end;
        end

        base64_encode = (options and options[:base64])
        module_eval <<-"end;"
          def self.ezcrypto_base64?
            #{base64_encode.to_s}
          end
        end;
        
        self.encrypted_attributes=attributes
      end
Turn encryption on for this record. List all encrypted attributes

  class Document < ActiveRecord::Base
		encrypt :title,:body
	end

Options are:
  <tt>key</tt> - to specify an external KeyHolder, which holds the key used for encrypting and decrypting
  <tt>base64</tt> - set to true in order to base64 encode the encrypted attributes.  defaults to false

  class Document < ActiveRecord::Base
  	belongs_to :user
  	encrypt :title,:body,:key=>:user, :base64 => true
  end
	
Turn encryption on for this record. List all encrypted attributes
class Document < ActiveRecord::Base
encrypt :title,:body
end

Options are:
key - to specify an external KeyHolder, which holds the key used for encrypting and decrypting
base64 - set to true in order to base64 encode the encrypted attributes.  defaults to false


Turn encryption on for this record . List all encrypted attributes class Document < ActiveRecord :: Base encrypt : title : body end Options are : key - to specify an external KeyHolder which holds the key used for encrypting and decrypting base64 - set to true in order to base64 encode the encrypted attributes . defaults to false
def encrypt(*attributes)        
      	include ActiveCrypto::Encrypted
      	before_save :encrypt_attributes
      	after_save :decrypt_attributes
        options=attributes.last.is_a?(Hash) ? attributes.pop : {}
        keyholder
        if options and options[:key]
  				module_eval <<-"end;"				 
  					def session_key
  						(send :#{options[:key]} ).send :session_key
  					end	 
  					@@external_key=true
  				end;
        end
        base64_encode = (options and options[:base64])
        module_eval <<-"end;"
          def self.ezcrypto_base64?
            #{base64_encode.to_s}
          end
        end;
        self.encrypted_attributes=attributes
      end
def encrypt ( * attributes ) include ActiveCrypto :: Encrypted before_save :encrypt_attributes after_save :decrypt_attributes options = attributes . last . is_a? ( Hash ) ? attributes . pop : { } keyholder if options and options [ :key ] module_eval <<-"end;" 
  					def session_key
  						(send : #{ options [ :key ] }  ).send :session_key
  					end	 
  					@@external_key=true
  				 end; end base64_encode = ( options and options [ :base64 ] ) module_eval <<-"end;" 
          def self.ezcrypto_base64?
             #{ base64_encode . to_s } 
          end
         end; self . encrypted_attributes = attributes end
Turn encryption on for this record.
Turn encryption on for this record .
attributes