Skip to content

Commit

Permalink
Set hashes backend as default backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaphorme committed Nov 6, 2024
1 parent 1fb6264 commit bffea53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ ring = { version = "0.17" , optional = true }
clap = { version = "4.5", features = ["derive"]}

[features]
default = []
default = ["hashes_backend"]
hashes_backend = ["md2", "md4", "md-5", "sha1", "sha2", "digest"]
ring_backend = ["ring"]
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ ezcheck have two backends: [ring](https://docs.rs/ring) and [hashes](https://doc
| Implement languages | Assembly, Rust, C and etc.. | Rust |
| Compatibility | May not work on every machine with different architecture. | Works well with Rust. |

❗️ To achieve maximum compatibility, the default backend is **hashes backend**.

⚠️ Please notice that although ezcheck(hashes backend) supports a lot of hash algorithms, `MD2`, `MD4`, `MD5`, `SHA1` are proven to be **insecure**. ezcheck still provides them for maximum compatibility, but **it does not recommend users continue to use them**.

## Build
Expand All @@ -24,20 +26,20 @@ ezcheck have two backends: [ring](https://docs.rs/ring) and [hashes](https://doc
```bash
$ git clone https://github.com/Metaphorme/ezcheck
$ cd ezcheck
$ # Choose one from ring backend or hashes backend
$ # ring backend
$ cargo build --release --features ring_backend
$ # Choose one from hashes backend or ring backend
$ # hashes backend
$ cargo build --release --features hashes_backend
$ # ring backend
$ cargo build --release --no-default-features --features ring_backend
$
$ ./target/release/ezcheck --version
```

### Run tests

```bash
$ cargo test --features ring_backend # ring backend
$ cargo test --features hashes_backend # hashes backend
$ cargo test --no-default-features --features ring_backend # ring backend
```

## Usage
Expand Down

0 comments on commit bffea53

Please sign in to comment.