chore: update deps

This commit is contained in:
2026-02-19 20:57:57 +01:00
parent eb5827c234
commit ef58f92577
5 changed files with 8 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ uuid = "1"
crdts = "7"
gpgme = "0.11"
dyn-clone = "1"
phf = {version = "0.11", features = ["macros"]}
phf = {version = "0.13", features = ["macros"]}
[dependencies.crdt-enc]
path = "../crdt-enc"

View File

@@ -6,7 +6,7 @@ edition = "2024"
[dependencies]
crdts = "7"
rand = "0.8"
rand = { version = "0.10", features = ["thread_rng"] }
anyhow = "1"
serde = "1"
rmp-serde = "1"

View File

@@ -3,7 +3,7 @@ use ::anyhow::{Context, Error, Result};
use ::async_trait::async_trait;
use ::chacha20poly1305::{Key, KeyInit, XChaCha20Poly1305, XNonce, aead::Aead};
use ::crdt_enc::utils::{VersionBytes, VersionBytesRef};
use ::rand::{RngCore, thread_rng};
use ::rand::{TryRng, rng};
use ::serde::{Deserialize, Serialize};
use ::std::{borrow::Cow, fmt::Debug};
use ::uuid::Uuid;
@@ -29,7 +29,7 @@ impl crdt_enc::cryptor::Cryptor for EncHandler {
async fn gen_key(&self) -> Result<VersionBytes> {
spawn_blocking(|| {
let mut key = [0u8; KEY_LEN];
thread_rng()
rng()
.try_fill_bytes(&mut key)
.context("Unable to get random data for secret key")?;
Ok(VersionBytes::new(KEY_VERSION, key.into()))
@@ -49,7 +49,7 @@ impl crdt_enc::cryptor::Cryptor for EncHandler {
let key = Key::from_slice(&key);
let aead = XChaCha20Poly1305::new(key);
let mut nonce = [0u8; NONCE_LEN];
thread_rng()
rng()
.try_fill_bytes(&mut nonce)
.context("Unable to get random data for nonce")?;
let xnonce = XNonce::from_slice(&nonce);

View File

@@ -11,11 +11,11 @@ serde_bytes = "0.11"
rmp-serde = "1"
async-trait = "0.1"
anyhow = "1"
thiserror = "1"
thiserror = "2"
futures = "0.3"
dyn-clone = "1"
bytes = "1"
phf = {version = "0.11", features = ["macros"]}
phf = {version = "0.13", features = ["macros"]}
[dependencies.uuid]
version = "1"

View File

@@ -253,7 +253,7 @@ impl<'a> VersionBytesBuf<'a> {
pub fn new(version: Uuid, content: &'a [u8]) -> VersionBytesBuf<'a> {
VersionBytesBuf {
pos: 0,
version: *version.as_bytes(),
version: version.into_bytes(),
content,
}
}