File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 11
11
//!
12
12
//! # Usage
13
13
//!
14
+ //! ## One-shot API
15
+ //!
16
+ //! ```rust
17
+ //! use hex_literal::hex;
18
+ //! use sha1::{Sha1, Digest};
19
+ //!
20
+ //! let result = Sha1::digest(b"hello world");
21
+ //! assert_eq!(result[..], hex!("2aae6c35c94fcfb415dbe95f408b9ce91ee846ed"));
22
+ //! ```
23
+ //!
24
+ //! ## Incremental API
25
+ //!
14
26
//! ```rust
15
27
//! use hex_literal::hex;
16
28
//! use sha1::{Sha1, Digest};
Original file line number Diff line number Diff line change 11
11
//!
12
12
//! # Usage
13
13
//!
14
+ //! ## One-shot API
15
+ //!
16
+ //! ```rust
17
+ //! use hex_literal::hex;
18
+ //! use sha2::{Sha256, Digest};
19
+ //!
20
+ //! let result = Sha256::digest(b"hello world");
21
+ //! assert_eq!(result[..], hex!("
22
+ //! b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
23
+ //! ")[..]);
24
+ //! ```
25
+ //!
26
+ //! ## Incremental API
27
+ //!
14
28
//! ```rust
15
29
//! use hex_literal::hex;
16
30
//! use sha2::{Sha256, Sha512, Digest};
You can’t perform that action at this time.
0 commit comments