feat: random_iv_or_salt made independent in crypto::utils

This commit is contained in:
zonyitoo
2024-11-02 22:09:48 +08:00
parent 466309b970
commit e2ae9c88bc
3 changed files with 5 additions and 5 deletions

4
Cargo.lock generated
View File

@@ -3260,9 +3260,9 @@ dependencies = [
[[package]]
name = "shadowsocks-crypto"
version = "0.5.6"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e4c5a437e27929c991daa2073b130fd94731ebdc2ba771be95aed5029defcae"
checksum = "bc77ecb3a97509d22751b76665894fcffad2d10df8758f4e3f20c92ccde6bf4f"
dependencies = [
"aead",
"aes",

View File

@@ -93,12 +93,12 @@ aes = { version = "0.8", optional = true }
blake3 = "1.5"
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
shadowsocks-crypto = { version = "0.5.4", default-features = false, features = [
shadowsocks-crypto = { version = "0.5.8", default-features = false, features = [
"ring",
] }
[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
shadowsocks-crypto = { version = "0.5.4", default-features = false, features = [
shadowsocks-crypto = { version = "0.5.8", default-features = false, features = [
] }
[target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos"))'.dependencies]

View File

@@ -67,7 +67,7 @@ impl Context {
#[cfg(any(feature = "stream-cipher", feature = "aead-cipher", feature = "aead-cipher-2022"))]
loop {
use crate::crypto::v1::random_iv_or_salt;
use crate::crypto::utils::random_iv_or_salt;
random_iv_or_salt(nonce);