[package] name = "write-hasher" version = "0.1.2" edition = "2021" description = "Transparently calculate hash on (asynchronously) writing to an type" license = "MIT" documentation = "https://docs.rs/write-hasher" homepage = "https://github.com/uttarayan21/write-hasher" repository = "https://github.com/uttarayan21/write-hasher" [dependencies] digest = { version = "0.10.6", optional = true } pin-project = { version = "1.0.12", optional = true } tokio = { version = "1.27.0", optional = true } sha2 = { version = "0.10.6", optional = true } sha1 = { version = "0.10.5", optional = true } md2 = { version = "0.10.2", optional = true } md4 = { version = "0.10.2", optional = true } md5 = { version = "0.7.0", optional = true } crc32fast = { version = "1.3.2", optional = true } blake2 = { version = "0.10.6", optional = true } futures = { version = "0.3.28", optional = true } crc32c = { version = "0.6.3", optional = false } [features] default = ["stdio", "digest"] # Which version of AsyncWrite / Write trait to use tokio = ["dep:tokio", "dep:pin-project"] futures = ["dep:futures", "dep:pin-project"] stdio = [] # Generic impl over digest trait. digest = ["dep:digest"] # Concrete implementations using digest sha2 = ["dep:sha2", "dep:digest"] sha1 = ["dep:sha1", "dep:digest"] md2 = ["dep:md2", "dep:digest"] md4 = ["dep:md4", "dep:digest"] md5 = ["dep:md5", "dep:digest"] blake2 = ["dep:blake2", "dep:digest"] crc32fast = ["dep:crc32fast"] # crc32c = ["dep:crc32c"] concrete_impls = ["sha2", "sha1", "md2", "md4", "md5", "blake2", "crc32fast"] [dev-dependencies] crc32fast = { version = "1.3.2" } sha2 = "0.10.6" tokio = { version = "1.27.0", features = ["io-util", "test-util", "fs", "macros"] }