[package] name = "sqlite-hashes" version = "0.7.6" # This value is also used in the README.md description = "Hashing functions for SQLite with aggregation support: MD5, SHA1, SHA256, SHA512, FNV-1a, xxHash" authors = ["Yuri Astrakhan "] repository = "https://github.com/nyurik/sqlite-hashes" edition = "2021" license = "MIT OR Apache-2.0" keywords = ["sqlite", "rusqlite", "hash", "md5", "sha256"] categories = ["database", "cryptography"] rust-version = "1.77.2" [lib] name = "sqlite_hashes" # Loadable extenios is a cdylib (lib), but Rust does not allow multiple libs per crate, so using an example instead. # See https://github.com/rust-lang/cargo/issues/8628 [[example]] name = "sqlite_hashes" path = "src/cdylib/cdylib.rs" crate-type = ["cdylib"] required-features = ["loadable_extension"] [features] default = ["trace", "aggregate", "window", "hex", "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "fnv", "xxhash"] # Use this feature to build loadable extension. # Assumes --no-default-features. # Does not support windowing functionality yet. default_loadable_extension = ["loadable_extension", "aggregate", "hex", "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "fnv", "xxhash"] # # Enable Trace Logging trace = ["dep:hex", "dep:log"] # # Enable HEX-outputing variants like *_hex() and *_concat_hex() (with "aggregate" feature) hex = ["dep:hex"] # # Enable aggregate functions aggregate = [] # # Enable window functions in addition to aggregate functions. Uses bundled SQLite. Not supported with loadable extension. window = ["aggregate", "rusqlite/bundled", "rusqlite/window"] # "rusqlite/bundled", "rusqlite/modern_sqlite" # # Build loadable extension. Not compatible with the window feature. # See https://github.com/rusqlite/rusqlite/discussions/1423 # This feature does not work with "rusqlite/modern_sqlite", "window" loadable_extension = ["rusqlite/loadable_extension", "rusqlite/trace"] # # Hashing algorithms md5 = ["dep:md-5"] sha1 = ["dep:sha1"] sha224 = ["dep:sha2"] sha256 = ["dep:sha2"] sha384 = ["dep:sha2"] sha512 = ["dep:sha2"] fnv = ["dep:noncrypto-digests", "noncrypto-digests?/fnv"] xxhash = ["dep:noncrypto-digests", "noncrypto-digests?/xxh3", "noncrypto-digests?/xxh32", "noncrypto-digests?/xxh64"] [dependencies] hex = { version = "0.4", optional = true } log = { version = "0.4.22", optional = true } # There are multiple versions that could work, but sqlx requires a specific one, so don't limit it here # Note that cdylib requires >= 0.32 (controlled by the lock file) rusqlite = { version = ">=0.30", features = ["functions"] } # Digest and all hashing algorithms are using the same crates internally, so should be kept in sync digest = "0.10.7" md-5 = { version = "0.10.6", optional = true } sha1 = { version = "0.10.6", optional = true } sha2 = { version = "0.10.8", optional = true } noncrypto-digests = { version = "0.3.2", optional = true } [dev-dependencies] cargo-husky = { version = "1", features = ["user-hooks"], default-features = false } criterion = { version = "0.5", features = ["html_reports"] } ctor = "0.2" env_logger = "0.11" insta = { version = "1", features = [] } [lints.rust] unused_qualifications = "warn" [lints.clippy] pedantic = { level = "warn", priority = -1 } missing_errors_doc = "allow" module_name_repetitions = "allow" [[bench]] name = "bench" harness = false #[patch.crates-io] #rusqlite = { path = "../rusqlite" } #libsqlite3-sys = { path = "../rusqlite/libsqlite3-sys" }