Class: EzCrypto::Encrypter

Inherits:
CipherWrapper show all
Defined in:
lib/extensions/ezcrypto/ezcrypto/ezcrypto.rb

Overview

Wrapper around OpenSSL Cipher for Encryption use.

You probably should be using Key instead.

Warning! The interface may change.

Instance Method Summary collapse

Methods inherited from CipherWrapper

#<<, #final, #gulp, #reset, #to_target, #update

Constructor Details

#initialize(key, target = "", algorithm = "aes-128-cbc") ⇒ Encrypter

Returns a new instance of Encrypter.



505
506
507
# File 'lib/extensions/ezcrypto/ezcrypto/ezcrypto.rb', line 505

def initialize(key,target="",algorithm="aes-128-cbc")
  super(key,target,true,algorithm)
end

Instance Method Details

#encrypt(data) ⇒ Object



512
513
514
# File 'lib/extensions/ezcrypto/ezcrypto/ezcrypto.rb', line 512

def encrypt(data)    
  gulp(data)
end