refactor: use u64 instead of u8[8] buffer; allow user to override salt.

This commit is contained in:
Jixun Wu
2024-09-12 00:18:12 +01:00
parent 8fcc07199b
commit f592acb220
3 changed files with 59 additions and 38 deletions

View File

@@ -17,12 +17,13 @@ categories = ["cryptography"]
maintenance = { status = "as-is" }
[dependencies]
byteorder = "1.5.0"
thiserror = "1.0.63"
rand = { version = "0.8.5" }
rand = { version = "0.8.5", optional = true }
rand_chacha = { version = "0.3.1", optional = true }
rand_pcg = { version = "0.3.1", optional = true }
byteorder = "1.5.0"
[features]
default = ["rand_pcg"]
secure_random = ["rand/getrandom", "rand/rand_chacha", "rand_chacha"]
default = ["random", "random_secure"]
random = ["rand", "rand_pcg"]
random_secure = ["rand/getrandom", "rand/rand_chacha", "rand_chacha"]