Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dmitry Baryshkov
nettle
Commits
42721f77
Commit
42721f77
authored
Jan 27, 2003
by
Niels Möller
Browse files
(dsa_signature_from_sexp): New function.
Rev: src/nettle/dsa.h:1.6 Rev: src/nettle/sexp2dsa.c:1.3
parent
d41a05cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
dsa.h
View file @
42721f77
...
...
@@ -153,6 +153,10 @@ dsa_generate_keypair(struct dsa_public_key *pub,
struct
sexp_iterator
;
int
dsa_signature_from_sexp
(
struct
dsa_signature
*
rs
,
struct
sexp_iterator
*
i
);
int
dsa_keypair_from_sexp_alist
(
struct
dsa_public_key
*
pub
,
struct
dsa_private_key
*
priv
,
...
...
sexp2dsa.c
View file @
42721f77
...
...
@@ -87,4 +87,20 @@ dsa_keypair_from_sexp(struct dsa_public_key *pub,
&&
dsa_keypair_from_sexp_alist
(
pub
,
priv
,
limit
,
&
i
);
}
int
dsa_signature_from_sexp
(
struct
dsa_signature
*
rs
,
struct
sexp_iterator
*
i
)
{
static
const
uint8_t
*
names
[
2
]
=
{
"r"
,
"s"
};
struct
sexp_iterator
values
[
2
];
if
(
!
sexp_iterator_assoc
(
i
,
2
,
names
,
values
))
return
0
;
GET
(
rs
->
r
,
160
,
&
values
[
0
]);
GET
(
rs
->
s
,
160
,
&
values
[
1
]);
return
1
;
}
#endif
/* WITH_PUBLIC_KEY */
Write
Preview
Supports
Markdown
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