From 5c3075fe0163f869a0d6cf76f8e5a86a441fa132 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 23 Jan 2023 18:08:14 +0000 Subject: Cargo.toml: Updated zstd from 0.9 to 0.12. --- src/model/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/model') diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 323c2d64..3565974f 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -28,7 +28,7 @@ hex = "0.4" base64 = "0.13" tracing = "0.1.30" rand = "0.8" -zstd = { version = "0.9", default-features = false } +zstd = { version = "0.12", default-features = false } serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } serde_bytes = "0.11" -- cgit v1.2.3 From 36944f1839b27d0c60feadbe15e1d91ad9b74538 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 23 Jan 2023 19:14:07 +0000 Subject: Cargo.toml: Updated base64 from 0.13 to 0.21. --- src/model/Cargo.toml | 2 +- src/model/k2v/causality.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/model') diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 3565974f..b47ec195 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -25,7 +25,7 @@ arc-swap = "1.0" blake2 = "0.9" err-derive = "0.3" hex = "0.4" -base64 = "0.13" +base64 = "0.21" tracing = "0.1.30" rand = "0.8" zstd = { version = "0.12", default-features = false } diff --git a/src/model/k2v/causality.rs b/src/model/k2v/causality.rs index 9a692870..62488d53 100644 --- a/src/model/k2v/causality.rs +++ b/src/model/k2v/causality.rs @@ -1,3 +1,5 @@ +use base64::prelude::*; + use std::collections::BTreeMap; use std::convert::TryInto; @@ -41,11 +43,12 @@ impl CausalContext { bytes.extend(u64::to_be_bytes(i)); } - base64::encode_config(bytes, base64::URL_SAFE_NO_PAD) + BASE64_URL_SAFE_NO_PAD.encode(bytes) } /// Parse from base64-encoded binary representation pub fn parse(s: &str) -> Result { - let bytes = base64::decode_config(s, base64::URL_SAFE_NO_PAD) + let bytes = BASE64_URL_SAFE_NO_PAD + .decode(s) .map_err(|e| format!("bad causality token base64: {}", e))?; if bytes.len() % 16 != 8 || bytes.len() < 8 { return Err("bad causality token length".into()); -- cgit v1.2.3 From f952e37ba772b9286ba814ddb29f17d0ec7731c6 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 23 Jan 2023 22:19:37 +0000 Subject: {model,util}/Cargo.toml: Updated blake2 from 0.9 to 0.10. --- src/model/Cargo.toml | 2 +- src/model/k2v/item_table.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/model') diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index b47ec195..7c1e242a 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -22,7 +22,7 @@ garage_util = { version = "0.8.1", path = "../util" } async-trait = "0.1.7" arc-swap = "1.0" -blake2 = "0.9" +blake2 = "0.10" err-derive = "0.3" hex = "0.4" base64 = "0.21" diff --git a/src/model/k2v/item_table.rs b/src/model/k2v/item_table.rs index ce3e4129..9955a9cd 100644 --- a/src/model/k2v/item_table.rs +++ b/src/model/k2v/item_table.rs @@ -173,9 +173,9 @@ impl Crdt for DvvsEntry { impl PartitionKey for K2VItemPartition { fn hash(&self) -> Hash { - use blake2::{Blake2b, Digest}; + use blake2::{Blake2b512, Digest}; - let mut hasher = Blake2b::new(); + let mut hasher = Blake2b512::new(); hasher.update(self.bucket_id.as_slice()); hasher.update(self.partition_key.as_bytes()); let mut hash = [0u8; 32]; -- cgit v1.2.3 From 20c1cdf662a0b5368a8020526f43e08baedfedaa Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Mon, 23 Jan 2023 22:27:44 +0000 Subject: Cargo.toml: Loosen tracing dependency to just 0.1. --- src/model/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/model') diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 7c1e242a..d1c7cd29 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -26,7 +26,7 @@ blake2 = "0.10" err-derive = "0.3" hex = "0.4" base64 = "0.21" -tracing = "0.1.30" +tracing = "0.1" rand = "0.8" zstd = { version = "0.12", default-features = false } -- cgit v1.2.3