Class: Cryptosystem::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptosystem/base.rb

Direct Known Subclasses

RSA

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



4
5
6
# File 'lib/cryptosystem/base.rb', line 4

def configure
  yield self
end

Instance Method Details

#base64_decode(value) ⇒ Object



21
22
23
# File 'lib/cryptosystem/base.rb', line 21

def base64_decode(value)
  Base64.strict_decode64(value)
end

#base64_encode(value) ⇒ Object



17
18
19
# File 'lib/cryptosystem/base.rb', line 17

def base64_encode(value)
  Base64.strict_encode64(value)
end

#expand_path(path) ⇒ Object



9
10
11
# File 'lib/cryptosystem/base.rb', line 9

def expand_path(path)
  File.expand_path(path)
end

#read_file(path) ⇒ Object



13
14
15
# File 'lib/cryptosystem/base.rb', line 13

def read_file(path)
  File.read(path)
end