mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 08:27:06 +00:00
chore(deps): migrate direct encoding deps to simd (#6690)
This commit is contained in:
@@ -57,7 +57,7 @@ hotpath.workspace = true
|
||||
aes-gcm = { workspace = true, features = ["rand_core"] }
|
||||
bytes = { workspace = true, features = ["serde"] }
|
||||
chacha20poly1305.workspace = true
|
||||
hex.workspace = true
|
||||
hex-simd.workspace = true
|
||||
hmac.workspace = true
|
||||
minlz.workspace = true
|
||||
pin-project-lite.workspace = true
|
||||
|
||||
@@ -731,12 +731,15 @@ fn random_stream_nonce() -> [u8; 12] {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use hex::encode as hex_encode;
|
||||
use std::io::Cursor;
|
||||
use tokio::io::AsyncReadExt;
|
||||
|
||||
const DARE_PACKAGE_SIZE: usize = DARE_HEADER_SIZE + DARE_PAYLOAD_SIZE + DARE_TAG_SIZE;
|
||||
|
||||
fn hex_encode(data: impl AsRef<[u8]>) -> String {
|
||||
hex_simd::encode_to_string(data, hex_simd::AsciiCase::Lower)
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn decrypt_reader_can_start_from_non_zero_sequence_number() {
|
||||
let plaintext = vec![0xAB; DARE_PAYLOAD_SIZE * 2 + 19];
|
||||
|
||||
Reference in New Issue
Block a user