Module: Cryptatron

Defined in:
lib/cryptatron.rb,
lib/cryptatron/version.rb

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.decrypt(body) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/cryptatron.rb', line 18

def self.decrypt(body)
	begin
		@cipher.decrypt(body)
	rescue
		nil
	end
end

.encrypt(body) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/cryptatron.rb', line 10

def self.encrypt(body)
	begin
		Base64.strict_encode64 @cipher.encrypt(body, binary: true)
	rescue
		nil
	end
end