Skip to content

Commit 03c79fb

Browse files
committed
implement \Sign\ trait on standalone struct
1 parent 5d3e2a2 commit 03c79fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ecdsa/src/impl_signature_trait.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ pub mod signers {
1111
macro_rules! impl_signature_trait {
1212
(
1313
$digest_alg_name:ident,
14-
$alias:ident,
14+
$name:ident,
1515
$sign_fn:ident,
1616
$verify_fn:ident
1717
) => {
1818
#[allow(non_camel_case_types)]
1919
#[doc = concat!("A signer using [`libcrux_sha2::", stringify!($digest_alg_name),"`].")]
20-
pub type $alias = Signer<libcrux_sha2::$digest_alg_name>;
20+
pub struct $name;
2121

2222
/// The [`arrayref`](libcrux_traits::signature::arrayref) version of the Sign trait.
23-
impl arrayref::Sign<SIGNING_KEY_LEN, VERIFICATION_KEY_LEN, SIG_LEN, RAND_KEYGEN_LEN> for $alias {
23+
impl arrayref::Sign<SIGNING_KEY_LEN, VERIFICATION_KEY_LEN, SIG_LEN, RAND_KEYGEN_LEN> for $name {
2424
/// The nonce needed for signing.
2525
type SignAux<'a> = &'a Nonce;
2626
/// Sign a payload using a provided signing key and `nonce`.
@@ -77,7 +77,7 @@ pub mod signers {
7777
}
7878
}
7979
libcrux_traits::impl_signature_slice_trait!(
80-
$alias => SIGNING_KEY_LEN, VERIFICATION_KEY_LEN, SIG_LEN, RAND_KEYGEN_LEN, &Nonce, nonce, (), _aux, u8);
80+
$name => SIGNING_KEY_LEN, VERIFICATION_KEY_LEN, SIG_LEN, RAND_KEYGEN_LEN, &Nonce, nonce, (), _aux, u8);
8181
};
8282
}
8383

0 commit comments

Comments
 (0)