Signer/Encrypted: typos
This commit is contained in:
parent
a0f5cb09db
commit
7f569b45fa
@ -106,7 +106,7 @@ module Encodings = struct
|
|||||||
let secp256k1 =
|
let secp256k1 =
|
||||||
let open Libsecp256k1.External in
|
let open Libsecp256k1.External in
|
||||||
let length =
|
let length =
|
||||||
Key.secret_bytes + Crypto_box.boxzerobytes +Raw.salt_len in
|
Key.secret_bytes + Crypto_box.boxzerobytes + Raw.salt_len in
|
||||||
Base58.register_encoding
|
Base58.register_encoding
|
||||||
~prefix: Base58.Prefix.secp256k1_encrypted_secret_key
|
~prefix: Base58.Prefix.secp256k1_encrypted_secret_key
|
||||||
~length
|
~length
|
||||||
@ -155,11 +155,11 @@ let rec interactive_decrypt_loop
|
|||||||
| None ->
|
| None ->
|
||||||
interactive_decrypt_loop cctxt ?name ~encrypted_sk algo
|
interactive_decrypt_loop cctxt ?name ~encrypted_sk algo
|
||||||
|
|
||||||
let rec noninteractice_decrypt_loop algo ~encrypted_sk = function
|
let rec noninteractive_decrypt_loop algo ~encrypted_sk = function
|
||||||
| [] -> return_none
|
| [] -> return_none
|
||||||
| password :: passwords ->
|
| password :: passwords ->
|
||||||
Raw.decrypt algo ~password ~encrypted_sk >>=? function
|
Raw.decrypt algo ~password ~encrypted_sk >>=? function
|
||||||
| None -> noninteractice_decrypt_loop algo ~encrypted_sk passwords
|
| None -> noninteractive_decrypt_loop algo ~encrypted_sk passwords
|
||||||
| Some sk -> return_some sk
|
| Some sk -> return_some sk
|
||||||
|
|
||||||
let decrypt_payload cctxt ?name encrypted_sk =
|
let decrypt_payload cctxt ?name encrypted_sk =
|
||||||
@ -172,7 +172,7 @@ let decrypt_payload cctxt ?name encrypted_sk =
|
|||||||
return (Signature.P256, encrypted_sk)
|
return (Signature.P256, encrypted_sk)
|
||||||
| _ -> failwith "Not a Base58Check-encoded encrypted key"
|
| _ -> failwith "Not a Base58Check-encoded encrypted key"
|
||||||
end >>=? fun (algo, encrypted_sk) ->
|
end >>=? fun (algo, encrypted_sk) ->
|
||||||
noninteractice_decrypt_loop algo ~encrypted_sk !passwords >>=? function
|
noninteractive_decrypt_loop algo ~encrypted_sk !passwords >>=? function
|
||||||
| Some sk -> return sk
|
| Some sk -> return sk
|
||||||
| None -> interactive_decrypt_loop cctxt ?name ~encrypted_sk algo
|
| None -> interactive_decrypt_loop cctxt ?name ~encrypted_sk algo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user