|
14 | 14 |
|
15 | 15 | //! # Using Ed448 generically over algorithm implementations/providers |
16 | 16 | //! |
17 | | -//! By using the `ed448-signature` crate, you can write code which signs and verifies |
| 17 | +//! By using the `ed448` crate, you can write code which signs and verifies |
18 | 18 | //! messages using the Ed448 signature algorithm generically over any |
19 | 19 | //! supported Ed448 implementation (see the next section for available |
20 | 20 | //! providers). |
|
26 | 26 | //! ## Example |
27 | 27 | //! |
28 | 28 | //! ``` |
29 | | -//! use ed448_signature::signature::{Signer, Verifier}; |
| 29 | +//! use ed448::signature::{Signer, Verifier}; |
30 | 30 | //! |
31 | 31 | //! pub struct HelloSigner<S> |
32 | 32 | //! where |
33 | | -//! S: Signer<ed448_signature::Signature> |
| 33 | +//! S: Signer<ed448::Signature> |
34 | 34 | //! { |
35 | 35 | //! pub signing_key: S |
36 | 36 | //! } |
37 | 37 | //! |
38 | 38 | //! impl<S> HelloSigner<S> |
39 | 39 | //! where |
40 | | -//! S: Signer<ed448_signature::Signature> |
| 40 | +//! S: Signer<ed448::Signature> |
41 | 41 | //! { |
42 | | -//! pub fn sign(&self, person: &str) -> ed448_signature::Signature { |
| 42 | +//! pub fn sign(&self, person: &str) -> ed448::Signature { |
43 | 43 | //! // NOTE: use `try_sign` if you'd like to be able to handle |
44 | 44 | //! // errors from external signing services/devices (e.g. HSM/KMS) |
45 | 45 | //! // <https://docs.rs/signature/latest/signature/trait.Signer.html#tymethod.try_sign> |
|
53 | 53 | //! |
54 | 54 | //! impl<V> HelloVerifier<V> |
55 | 55 | //! where |
56 | | -//! V: Verifier<ed448_signature::Signature> |
| 56 | +//! V: Verifier<ed448::Signature> |
57 | 57 | //! { |
58 | 58 | //! pub fn verify( |
59 | 59 | //! &self, |
60 | 60 | //! person: &str, |
61 | | -//! signature: &ed448_signature::Signature |
62 | | -//! ) -> Result<(), ed448_signature::Error> { |
| 61 | +//! signature: &ed448::Signature |
| 62 | +//! ) -> Result<(), ed448::Error> { |
63 | 63 | //! self.verifying_key.verify(format_message(person).as_bytes(), signature) |
64 | 64 | //! } |
65 | 65 | //! } |
@@ -211,7 +211,7 @@ impl TryFrom<&[u8]> for Signature { |
211 | 211 |
|
212 | 212 | impl fmt::Debug for Signature { |
213 | 213 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
214 | | - f.debug_struct("ed448_signature::Signature") |
| 214 | + f.debug_struct("ed448::Signature") |
215 | 215 | .field("R", self.r_bytes()) |
216 | 216 | .field("s", self.s_bytes()) |
217 | 217 | .finish() |
|
0 commit comments