Verified Commit 68e84931 authored by Nicolas Pinto's avatar Nicolas Pinto Committed by Grégoire Henry

Client: rename 'passphrase' into 'password' when encrypting keys

parent e642cb62
Pipeline #28249051 passed with stages
in 19 minutes and 7 seconds
......@@ -203,19 +203,19 @@ let decrypt_list (cctxt : #Client_context.io_wallet) keys =
return_unit
end sks
let rec read_passphrase (cctxt : #Client_context.io) =
let rec read_password (cctxt : #Client_context.io) =
cctxt#prompt_password
"Enter passphrase to encrypt your key: " >>=? fun password ->
"Enter password to encrypt your key: " >>=? fun password ->
cctxt#prompt_password
"Confirm passphrase: " >>=? fun confirm ->
"Confirm password: " >>=? fun confirm ->
if not (MBytes.equal password confirm) then
cctxt#message "Passphrases do not match." >>= fun () ->
read_passphrase cctxt
cctxt#message "Passwords do not match." >>= fun () ->
read_password cctxt
else
return password
let encrypt cctxt sk =
read_passphrase cctxt >>=? fun password ->
read_password cctxt >>=? fun password ->
let payload = Raw.encrypt ~password sk in
let encoding = match sk with
| Ed25519 _ -> Encodings.ed25519
......@@ -236,7 +236,7 @@ module Make(C : sig val cctxt: Client_context.prompter end) = struct
let description =
"Valid secret key URIs are of the form\n\
\ - encrypted:<encrypted_key>\n\
where <encrypted_key> is the encrypted (passphrase protected \
where <encrypted_key> is the encrypted (password protected \
using Nacl's cryptobox and pbkdf) secret key, formatted in \
unprefixed Base58.\n\
Valid public key URIs are of the form\n\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment