class DCase::Crypto
Public Class Methods
new(password)
click to toggle source
# File lib/dcase/crypto.rb, line 5 def initialize(password) @encrypt_table, @decrypt_table = get_table(password) end
Public Instance Methods
decrypt(data)
click to toggle source
# File lib/dcase/crypto.rb, line 13 def decrypt(data) translate(@decrypt_table, data) end
encrypt(data)
click to toggle source
# File lib/dcase/crypto.rb, line 9 def encrypt(data) translate(@encrypt_table, data) end