2026-08-28 21:45:40 +07:00
|
|
|
[package]
|
2026-08-28 22:24:14 +07:00
|
|
|
name = "mytheclipse-crypto"
|
2026-08-30 11:54:01 +00:00
|
|
|
version = "1.21.2"
|
2026-08-28 21:45:40 +07:00
|
|
|
edition = "2021"
|
|
|
|
|
rust-version = "1.75"
|
|
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
|
repository = "https://github.com/asepharyana/mytheclipse"
|
|
|
|
|
homepage = "https://github.com/asepharyana/mytheclipse"
|
2026-08-28 22:24:14 +07:00
|
|
|
documentation = "https://docs.rs/mytheclipse-crypto"
|
2026-08-28 21:45:40 +07:00
|
|
|
authors = ["asepharyana <superaseph@gmail.com>"]
|
2026-08-29 16:04:50 +07:00
|
|
|
description = "Safe hashing, encryption, token helpers (Argon2id, AES-256-GCM, JWT/Paseto) with key rotation support."
|
2026-08-28 21:45:40 +07:00
|
|
|
readme = "README.md"
|
|
|
|
|
keywords = ["crypto", "argon2", "aes-gcm", "jwt", "security"]
|
|
|
|
|
categories = ["cryptography", "authentication"]
|
|
|
|
|
|
|
|
|
|
[features]
|
|
|
|
|
default = ["password", "encryption", "tokens"]
|
|
|
|
|
# Low-level primitives are always available (zero-cost). The feature flags
|
|
|
|
|
# pull in the backing SDK crates.
|
|
|
|
|
password = ["dep:password-hash", "dep:argon2"]
|
|
|
|
|
encryption = ["dep:aead", "dep:aes-gcm", "dep:rand_core", "dep:rand"]
|
|
|
|
|
tokens = ["encryption", "dep:serde", "dep:serde_json", "dep:base64", "dep:jsonwebtoken"]
|
2026-08-29 16:04:50 +07:00
|
|
|
paseto = ["encryption", "dep:serde", "dep:serde_json", "dep:base64", "dep:pasetors"]
|
|
|
|
|
rate-limit = ["dep:hashbrown", "dep:tokio"]
|
2026-08-29 19:07:46 +07:00
|
|
|
# HKDF-SHA256 key derivation (RFC 5869).
|
|
|
|
|
derivation = ["dep:hkdf", "dep:sha2"]
|
2026-08-28 21:45:40 +07:00
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
tracing = "0.1"
|
|
|
|
|
|
|
|
|
|
# Optional backends
|
|
|
|
|
argon2 = { version = "0.5", default-features = false, features = ["std"], optional = true }
|
|
|
|
|
password-hash = { version = "0.5", default-features = false, features = ["std"], optional = true }
|
|
|
|
|
aes-gcm = { version = "0.10", default-features = false, features = ["aes", "alloc"], optional = true }
|
|
|
|
|
aead = { version = "0.5", default-features = false, features = ["alloc"], optional = true }
|
|
|
|
|
jsonwebtoken = { version = "9", default-features = false, optional = true }
|
|
|
|
|
base64 = { version = "0.22", default-features = false, optional = true }
|
|
|
|
|
serde = { version = "1", optional = true, features = ["derive"] }
|
|
|
|
|
serde_json = { version = "1", optional = true }
|
|
|
|
|
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }
|
|
|
|
|
rand_core = { version = "0.6", optional = true }
|
2026-08-29 19:07:46 +07:00
|
|
|
hkdf = { version = "0.12", default-features = false, optional = true }
|
|
|
|
|
sha2 = { version = "0.10", optional = true }
|
2026-08-29 16:04:50 +07:00
|
|
|
pasetors = { version = "0.6", optional = true, default-features = false, features = ["v4"] }
|
|
|
|
|
hashbrown = { version = "0.15", optional = true }
|
|
|
|
|
tokio = { version = "1.53", features = ["sync", "time"], optional = true }
|