Skip to content

Commit

Permalink
Update PSS rustdoc example to match PKCS#1 v1.5 example
Browse files Browse the repository at this point in the history
Uses `rsa::sha2` to access `Sha256` in the code example, noting the
`sha2` feature must be enabled, ala #255
  • Loading branch information
tarcieri committed Jan 21, 2023
1 parent d10fcd9 commit 8ca0641
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@
//! ```
//!
//! ## PSS signatures
//! ```
//!
//! Note: requires `sha2` feature of `rsa` crate is enabled.
//!
#![cfg_attr(feature = "sha2", doc = "```")]
#![cfg_attr(not(feature = "sha2"), doc = "```ignore")]
//! use rsa::RsaPrivateKey;
//! use rsa::pss::{BlindedSigningKey, VerifyingKey};
//! use rsa::signature::{Keypair,RandomizedSigner, SignatureEncoding, Verifier};
//! use sha2::{Digest, Sha256};
//! use rsa::sha2::{Digest, Sha256};
//!
//! let mut rng = rand::thread_rng();
//!
Expand Down

0 comments on commit 8ca0641

Please sign in to comment.