Class: MoacEth::Key::Decrypter
- Inherits:
-
Object
- Object
- MoacEth::Key::Decrypter
show all
- Includes:
- Utils
- Defined in:
- lib/moac_eth/key/decrypter.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Utils
#base256_to_int, #bin_to_hex, #bin_to_prefixed_hex, #format_address, #hash160, #hex_to_bin, #int_to_base256, #keccak256, #keccak256_rlp, #keccak512, #normalize_address, #prefix_hex, #public_key_to_address, #remove_hex_prefix, #ripemd160, #sha256, #v_r_s_for, #valid_address?, #zpad, #zpad_hex, #zpad_int, #zunpad
Constructor Details
#initialize(data, password) ⇒ Decrypter
11
12
13
14
|
# File 'lib/moac_eth/key/decrypter.rb', line 11
def initialize(data, password)
@data = JSON.parse(data)
@password = password
end
|
Class Method Details
7
8
9
|
# File 'lib/moac_eth/key/decrypter.rb', line 7
def self.perform(data, password)
new(data, password).perform
end
|
Instance Method Details
16
17
18
19
20
|
# File 'lib/moac_eth/key/decrypter.rb', line 16
def perform
derive_key password
check_macs
bin_to_hex decrypted_data
end
|