feat: replace sodium secretbox cryptor with xchacha20poly1305

This commit is contained in:
2021-03-08 22:46:34 +01:00
parent 2b9d6fd1fc
commit 1201e9621c
6 changed files with 51 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
crdt-enc = {path="../../crdt-enc"}
crdt-enc-tokio = {path="../../crdt-enc-tokio"}
crdt-enc-sodium = {path="../../crdt-enc-sodium"}
crdt-enc-xchacha20poly1305 = {path="../../crdt-enc-xchacha20poly1305"}
crdt-enc-gpgme = {path="../../crdt-enc-gpgme"}
uuid = {version = "0.8", features = ["serde", "v4"]}
crdts = "6.2"

View File

@@ -1,7 +1,7 @@
use ::anyhow::Result;
use ::crdt_enc_gpgme::KeyHandler;
use ::crdt_enc_sodium::EncHandler;
use ::crdt_enc_tokio::Storage;
use ::crdt_enc_xchacha20poly1305::EncHandler;
use ::futures::task;
use ::uuid::Uuid;
@@ -23,8 +23,6 @@ impl task::Spawn for TokioSpawn {
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
crdt_enc_sodium::init();
let data_dir = std::fs::canonicalize("./").unwrap().join("data");
let storage = Storage::new(data_dir.join("local"), data_dir.join("remote"))?;