Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
d7b83c7d
Commit
d7b83c7d
authored
May 30, 2014
by
Stephane Glondu
Browse files
Move IO out of Tool_tkeygen
parent
be34a59c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tool/tool_cmdline.ml
View file @
d7b83c7d
...
...
@@ -111,6 +111,7 @@ module Tkeygen : CMDLINER_MODULE = struct
end
in
let
module
R
=
(
val
make
(
module
P
:
PARAMS
)
:
S
)
in
let
kp
=
R
.
trustee_keygen
()
in
Printf
.
printf
"I: keypair %s has been generated
\n
%!"
kp
.
R
.
id
;
let
pubkey
=
"public"
,
kp
.
R
.
id
^
".pubkey"
,
0o444
,
kp
.
R
.
pub
in
let
privkey
=
"private"
,
kp
.
R
.
id
^
".privkey"
,
0o400
,
kp
.
R
.
priv
in
let
save
(
kind
,
filename
,
perm
,
thing
)
=
...
...
src/tool/tool_tkeygen.ml
View file @
d7b83c7d
...
...
@@ -65,7 +65,6 @@ module Make (P : PARSED_PARAMS) : S = struct
(
sha256_hex
(
G
.
to_string
public_key
.
trustee_public_key
))
0
8
|>
String
.
uppercase
in
Printf
.
printf
"I: keypair %s has been generated
\n
%!"
id
;
let
priv
=
string_of_number
private_key
in
let
pub
=
string_of_trustee_public_key
G
.
write
public_key
in
{
id
;
priv
;
pub
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment