Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
9ee36699
Commit
9ee36699
authored
Oct 03, 2001
by
Niels Möller
Browse files
(make_sexp_print_raw_hash): Deleted
function. (sexp_print_raw_hash): Deleted command. Rev: src/sexp_commands.c:1.23
parent
2e0e5826
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sexp_commands.c
View file @
9ee36699
...
...
@@ -90,38 +90,7 @@ make_sexp_print_to(int format, struct abstract_write *dest)
&
dest
->
super
);
}
DEFINE_COMMAND3
(
sexp_print_raw_hash
)
(
struct
lsh_object
*
a1
,
struct
lsh_object
*
a2
,
struct
lsh_object
*
a3
,
struct
command_continuation
*
c
,
struct
exception_handler
*
e
UNUSED
)
{
CAST_SUBTYPE
(
hash_algorithm
,
algorithm
,
a1
);
CAST_SUBTYPE
(
abstract_write
,
dest
,
a2
);
CAST_SUBTYPE
(
sexp
,
o
,
a3
);
struct
lsh_string
*
canonical
=
sexp_format
(
o
,
SEXP_CANONICAL
,
0
);
struct
hash_instance
*
hash
=
MAKE_HASH
(
algorithm
);
struct
lsh_string
*
digest
=
lsh_string_alloc
(
hash
->
hash_size
);
HASH_UPDATE
(
hash
,
canonical
->
length
,
canonical
->
data
);
HASH_DIGEST
(
hash
,
digest
->
data
);
lsh_string_free
(
canonical
);
KILL
(
hash
);
A_WRITE
(
dest
,
ssh_format
(
"%lxfS
\n
"
,
digest
));
COMMAND_RETURN
(
c
,
o
);
}
struct
command
*
make_sexp_print_raw_hash
(
struct
hash_algorithm
*
algorithm
)
{
return
make_command_3_invoke
(
&
sexp_print_raw_hash
,
&
algorithm
->
super
);
}
/* FIXME: Should be obsoleted; used by spki_commands.c */
/* GABA:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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