mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
make trailing whitespace CI happy
This commit is contained in:
parent
d9ff07a32f
commit
52e9cd0630
1 changed files with 10 additions and 10 deletions
|
|
@ -29,7 +29,7 @@
|
||||||
//! let signing_key: SigningKey = SigningKey::generate(&mut csprng);
|
//! let signing_key: SigningKey = SigningKey::generate(&mut csprng);
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! We can now use this `signing_key` to sign a message:
|
//! We can now use this `signing_key` to sign a message:
|
||||||
#![cfg_attr(feature = "rand_core", doc = "```")]
|
#![cfg_attr(feature = "rand_core", doc = "```")]
|
||||||
#![cfg_attr(not(feature = "rand_core"), doc = "```ignore")]
|
#![cfg_attr(not(feature = "rand_core"), doc = "```ignore")]
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
//! let signature: Signature = signing_key.sign(message);
|
//! let signature: Signature = signing_key.sign(message);
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! As well as to verify that this is, indeed, a valid signature on
|
//! As well as to verify that this is, indeed, a valid signature on
|
||||||
//! that `message`:
|
//! that `message`:
|
||||||
#![cfg_attr(feature = "rand_core", doc = "```")]
|
#![cfg_attr(feature = "rand_core", doc = "```")]
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
//! assert!(signing_key.verify(message, &signature).is_ok());
|
//! assert!(signing_key.verify(message, &signature).is_ok());
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! Anyone else, given the `public` half of the `signing_key` can also easily
|
//! Anyone else, given the `public` half of the `signing_key` can also easily
|
||||||
//! verify this signature:
|
//! verify this signature:
|
||||||
#![cfg_attr(feature = "rand_core", doc = "```")]
|
#![cfg_attr(feature = "rand_core", doc = "```")]
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
//! assert!(verifying_key.verify(message, &signature).is_ok());
|
//! assert!(verifying_key.verify(message, &signature).is_ok());
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! ## Serialisation
|
//! ## Serialisation
|
||||||
//!
|
//!
|
||||||
//! `VerifyingKey`s, `SecretKey`s, `SigningKey`s, and `Signature`s can be serialised
|
//! `VerifyingKey`s, `SecretKey`s, `SigningKey`s, and `Signature`s can be serialised
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
//! let signature_bytes: [u8; SIGNATURE_LENGTH] = signature.to_bytes();
|
//! let signature_bytes: [u8; SIGNATURE_LENGTH] = signature.to_bytes();
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! And similarly, decoded from bytes with `::from_bytes()`:
|
//! And similarly, decoded from bytes with `::from_bytes()`:
|
||||||
#![cfg_attr(feature = "rand_core", doc = "```")]
|
#![cfg_attr(feature = "rand_core", doc = "```")]
|
||||||
#![cfg_attr(not(feature = "rand_core"), doc = "```ignore")]
|
#![cfg_attr(not(feature = "rand_core"), doc = "```ignore")]
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
//! # do_test();
|
//! # do_test();
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! ### PKCS#8 Key Encoding
|
//! ### PKCS#8 Key Encoding
|
||||||
//!
|
//!
|
||||||
//! PKCS#8 is a private key format with support for multiple algorithms.
|
//! PKCS#8 is a private key format with support for multiple algorithms.
|
||||||
|
|
@ -141,7 +141,7 @@
|
||||||
//! ```text
|
//! ```text
|
||||||
//! -----BEGIN PRIVATE KEY-----
|
//! -----BEGIN PRIVATE KEY-----
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! To use PKCS#8, you need to enable the `pkcs8` crate feature.
|
//! To use PKCS#8, you need to enable the `pkcs8` crate feature.
|
||||||
//!
|
//!
|
||||||
//! The following traits can be used to decode/encode [`SigningKey`] and
|
//! The following traits can be used to decode/encode [`SigningKey`] and
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
//! let verifying_key = VerifyingKey::from_public_key_pem(pem)
|
//! let verifying_key = VerifyingKey::from_public_key_pem(pem)
|
||||||
//! .expect("invalid public key PEM");
|
//! .expect("invalid public key PEM");
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! ### Using Serde
|
//! ### Using Serde
|
||||||
//!
|
//!
|
||||||
//! If you prefer the bytes to be wrapped in another serialisation format, all
|
//! If you prefer the bytes to be wrapped in another serialisation format, all
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
//! ```bash
|
//! ```bash
|
||||||
//! $ cargo build --features="serde"
|
//! $ cargo build --features="serde"
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! They can be then serialised into any of the wire formats which serde supports.
|
//! They can be then serialised into any of the wire formats which serde supports.
|
||||||
//! For example, using [bincode](https://github.com/TyOverby/bincode):
|
//! For example, using [bincode](https://github.com/TyOverby/bincode):
|
||||||
#![cfg_attr(all(feature = "rand_core", feature = "serde"), doc = "```")]
|
#![cfg_attr(all(feature = "rand_core", feature = "serde"), doc = "```")]
|
||||||
|
|
@ -196,7 +196,7 @@
|
||||||
//! let encoded_signature: Vec<u8> = serialize(&signature).unwrap();
|
//! let encoded_signature: Vec<u8> = serialize(&signature).unwrap();
|
||||||
//! # }
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! After sending the `encoded_verifying_key` and `encoded_signature`, the
|
//! After sending the `encoded_verifying_key` and `encoded_signature`, the
|
||||||
//! recipient may deserialise them and verify:
|
//! recipient may deserialise them and verify:
|
||||||
#![cfg_attr(all(feature = "rand_core", feature = "serde"), doc = "```")]
|
#![cfg_attr(all(feature = "rand_core", feature = "serde"), doc = "```")]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue