Added example to readme
This commit is contained in:
parent
954848a11a
commit
4782e117a5
4 changed files with 21 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -4,4 +4,4 @@ version = 3
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lore"
|
name = "lore"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lore"
|
name = "lore"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Zero-dependency hashing algorithms"
|
description = "Zero-dependency hashing algorithms"
|
||||||
license = "BSD-3-Clause"
|
license = "BSD-3-Clause"
|
||||||
|
|
12
README.md
12
README.md
|
@ -5,3 +5,15 @@ Hashing algorithms. Currently only implements md5.
|
||||||
Doesn't use any dependencies.
|
Doesn't use any dependencies.
|
||||||
|
|
||||||
Performance/stability not guaranteed.
|
Performance/stability not guaranteed.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```rust
|
||||||
|
use lore::md5;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let input = "lol xd";
|
||||||
|
let digest = md5::hash(input);
|
||||||
|
assert_eq!(digest, "982d7f24f8985a6baa5cf129acc73561");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
7
src/main.rs
Normal file
7
src/main.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
use lore::md5;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let input = "lol xd";
|
||||||
|
let digest = md5::hash(input);
|
||||||
|
assert_eq!(digest, "982d7f24f8985a6baa5cf129acc73561");
|
||||||
|
}
|
Loading…
Reference in a new issue