Method: Eth::Key::Encrypter#perform

Defined in:
lib/eth/key/encrypter.rb

#perform(password) ⇒ String

Encrypt the key with a given password.

Parameters:

  • password (String)

    a secret key used for encryption

Returns:

  • (String)

    a JSON-formatted keystore string.



70
71
72
73
74
# File 'lib/eth/key/encrypter.rb', line 70

def perform(password)
  derive_key password
  encrypt
  data.to_json
end