Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
86 lines (79 loc) · 2.61 KB
/
Copy pathCargo.toml
File metadata and controls
86 lines (79 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[package]
name = "multi-hash"
version = "4.0.0"
edition = "2024"
rust-version = "1.99"
authors = ["Dave Grantham <dwg@linuxprogrammer.org>"]
description = "Multihash self-describing cryptographic hash data"
repository = "https://github.com/cryptidtech/multi-hash.git"
readme = "README.md"
license = "Apache-2.0"
keywords = ["multihash", "multiformats", "hash", "crypto"]
categories = ["cryptography", "encoding"]
[features]
default = [
"blake2",
"blake3",
"md5",
"ripemd",
"serde",
"sha1",
"sha2",
"sha3",
"shake",
]
# each hash family is its own feature; with none enabled the crate still
# provides the Multihash type, its encoding, and Builder::with_hash
blake2 = ["dep:blake2", "dep:digest", "dep:typenum"]
blake3 = ["dep:blake3"]
# expose the FIPS approved codec constants, FIPS_CODECS and SAFE_FIPS_CODECS
fips = []
md5 = ["dep:digest", "dep:md-5"]
ripemd = ["dep:digest", "dep:ripemd"]
serde = ["dep:serde"]
sha1 = ["dep:digest", "dep:sha1"]
sha2 = ["dep:digest", "dep:sha2"]
sha3 = ["dep:digest", "dep:sha3"]
shake = ["dep:digest", "dep:shake"]
[dependencies]
blake2 = { version = "0.11.0", optional = true }
blake3 = { version = "1.8", features = ["traits-preview", "zeroize"], optional = true }
digest = { version = "0.11", features = ["alloc"], optional = true }
hex = "0.4"
md-5 = { version = "0.11", optional = true }
multi-base = "1.1"
multi-codec = "2.0"
multi-trait = "1.1"
multi-util = "2.0"
ripemd = { version = "0.2", optional = true }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"], optional = true }
sha1 = { version = "0.11", optional = true }
sha2 = { version = "0.11", optional = true }
sha3 = { version = "0.12", optional = true }
shake = { version = "0.1", optional = true }
subtle = "2"
thiserror = { version = "2.0" }
typenum = { version = "1.20", optional = true }
unsigned-varint = { version = "0.8", features = ["std"] }
[dev-dependencies]
ciborium = "0.2"
criterion = { version = "0.8", features = ["html_reports"] }
hex = "0.4"
proptest = "1.11"
serde_json = "1.0"
serde_test = "1.0"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
# blake3 1.8 still pulls in its own digest dependency; allow the version
# duplication until blake3 publishes a release that uses digest 0.11
# directly from the RustCrypto ecosystem.
multiple_crate_versions = { level = "allow", priority = 1 }
[lints.rust]
unsafe_code = "deny"
[[bench]]
name = "multihash_bench"
harness = false
path = "benches/multihash_bench.rs"
required-features = ["blake3", "md5", "sha2", "sha3", "shake"]