diff --git a/crdt-enc-sodium/src/lib.rs b/crdt-enc-sodium/src/lib.rs index f548304..1ef142b 100644 --- a/crdt-enc-sodium/src/lib.rs +++ b/crdt-enc-sodium/src/lib.rs @@ -6,11 +6,9 @@ use sodiumoxide::crypto::secretbox; use std::{borrow::Cow, fmt::Debug}; use uuid::Uuid; -// c7f269be-0ff5-4a77-99c3-7c23c96d5cb4 -const DATA_VERSION: Uuid = Uuid::from_u128(0xc7f269be0ff54a7799c37c23c96d5cb4); +const DATA_VERSION: Uuid = Uuid::from_u128(0xc7f269be_0ff5_4a77_99c3_7c23c96d5cb4); -// 5df28591-439a-4cef-8ca6-8433276cc9ed -const KEY_VERSION: Uuid = Uuid::from_u128(0x5df28591439a4cef8ca68433276cc9ed); +const KEY_VERSION: Uuid = Uuid::from_u128(0x5df28591_439a_4cef_8ca6_8433276cc9ed); pub fn init() { sodiumoxide::init().expect("sodium init failed"); diff --git a/examples/test/src/main.rs b/examples/test/src/main.rs index 600d3c2..00dc88a 100644 --- a/examples/test/src/main.rs +++ b/examples/test/src/main.rs @@ -4,7 +4,9 @@ use crdt_enc_sodium::EncHandler; use crdt_enc_tokio::Storage; use uuid::Uuid; -const CURRENT_DATA_VERSION: Uuid = Uuid::from_u128(1u128); +const CURRENT_DATA_VERSION: Uuid = Uuid::from_u128(0xaadfd5a6_6e19_4b24_a802_4fa27c72f20c); + +const SUPPORTED_DATA_VERSIONS: [Uuid; 1] = [CURRENT_DATA_VERSION]; #[tokio::main(flavor = "current_thread")] async fn main() -> Result<()> { @@ -20,7 +22,7 @@ async fn main() -> Result<()> { cryptor, key_cryptor, create: true, - supported_data_versions: [CURRENT_DATA_VERSION].iter().cloned().collect(), + supported_data_versions: SUPPORTED_DATA_VERSIONS.iter().cloned().collect(), current_data_version: CURRENT_DATA_VERSION, }; let (repo, info) = crdt_enc::Core::open(open_options).await?;