Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ println!("Result: {:x}", hash);

In this example `hash` has type `GenericArray<u8, U32>`, which is a generic alternative to `[u8; 32]` defined in the [`generic-array`] crate.

Alternatively, you can use chained approach, which is equivalent to the previous example:
Alternatively, you can use a chained approach, which is equivalent to the previous example:

```rust
use sha2::{Sha256, Digest};

let hash = Sha256::new()
.chain(b"Hello world!")
.chain("String data")
.chain_update(b"Hello world!")
.chain_update("String data")
.finalize();
println!("Result: {:x}", hash);
```
Expand Down