sqlite-hashes 0.10.10

Hashing functions for SQLite with aggregation support: MD5, SHA1, SHA256, SHA512, Blake3, FNV-1a, xxHash
Documentation
[package]
name = "sqlite-hashes"
# This value is also used in the README.md
version = "0.10.10"
description = "Hashing functions for SQLite with aggregation support: MD5, SHA1, SHA256, SHA512, Blake3, FNV-1a, xxHash"
authors = ["Yuri Astrakhan <YuriAstrakhan@gmail.com>"]
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.85"

[lib]
name = "sqlite_hashes"

# Loadable extension 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"]

[[bench]]
name = "bench"
harness = false

[features]
default = [
    "trace",
    "aggregate",
    "hex",
    "md5",
    "sha1",
    "sha224",
    "sha256",
    "sha384",
    "sha512",
    "blake3",
    "fnv",
    "xxhash",
]
# Use this feature to build a loadable extension.
# Assumes --no-default-features.
default_loadable_extension = [
    "loadable_extension",
    "aggregate",
    "hex",
    "md5",
    "sha1",
    "sha224",
    "sha256",
    "sha384",
    "sha512",
    "blake3",
    "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 = []
#
# "rusqlite/bundled", "rusqlite/modern_sqlite"
#
# Build loadable extension.
# See https://github.com/rusqlite/rusqlite/discussions/1423
# This feature does not work with "rusqlite/modern_sqlite"
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"]
blake3 = ["dep:blake3"]
fnv = ["dep:noncrypto-digests", "noncrypto-digests?/fnv"]
xxhash = [
    "dep:noncrypto-digests",
    "noncrypto-digests?/xxh3",
    "noncrypto-digests?/xxh32",
    "noncrypto-digests?/xxh64",
]

[dependencies]
blake3 = { version = "1.8.4", features = ["traits-preview"], optional = true }
hex = { version = "0.4", optional = true }
log = { version = "0.4.28", 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.0 (controlled by the lock file)
# The `set-min-rusqlite-version` just recipe will parse the minimum version from here, so it must be 3 part
rusqlite = { version = ">=0.30.0", features = ["functions"] }

# Digest and all hashing algorithms are using the same crates internally, so should be kept in sync
digest = "0.11.3"
md-5 = { version = "0.11.0", optional = true }
noncrypto-digests = { version = "0.4.0", optional = true }
sha1 = { version = "0.11.0", optional = true }
sha2 = { version = "0.11.0", optional = true }

[dev-dependencies]
criterion = { version = "0.8", features = ["html_reports"] }
ctor = "1.0"
env_logger = "0.11"
insta = { version = "1", features = [] }

[lints.rust]
unused_qualifications = "warn"

[lints.clippy]
# Restrictions
panic_in_result_fn = "warn"
todo = "warn"
unwrap_used = "warn"
# Pedantics without being too noisy
cargo = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
missing_errors_doc = "allow"
module_name_repetitions = "allow"
multiple_crate_versions = "allow"

#[patch.crates-io]
#rusqlite = { path = "../rusqlite" }
#libsqlite3-sys = { path = "../rusqlite/libsqlite3-sys" }