diff --git a/Cargo.lock b/Cargo.lock
index 71da5935d..7e63036bb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -111,9 +111,9 @@ dependencies = [
[[package]]
name = "askama"
-version = "0.13.1"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d4744ed2eef2645831b441d8f5459689ade2ab27c854488fbab1fbe94fce1a7"
+checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"
dependencies = [
"askama_derive",
"itoa",
@@ -124,9 +124,9 @@ dependencies = [
[[package]]
name = "askama_derive"
-version = "0.13.1"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d661e0f57be36a5c14c48f78d09011e67e0cb618f269cca9f2fd8d15b68c46ac"
+checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"
dependencies = [
"askama_parser",
"basic-toml",
@@ -141,9 +141,9 @@ dependencies = [
[[package]]
name = "askama_parser"
-version = "0.13.0"
+version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f"
+checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"
dependencies = [
"memchr",
"serde",
@@ -567,8 +567,8 @@ name = "devolutions-crypto-uniffi"
version = "0.9.3"
dependencies = [
"devolutions-crypto",
+ "rust-argon2",
"uniffi",
- "uniffi-builder-macro",
]
[[package]]
@@ -756,6 +756,8 @@ checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
dependencies = [
"equivalent",
"hashbrown 0.16.0",
+ "serde",
+ "serde_core",
]
[[package]]
@@ -1299,6 +1301,15 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "serde_spanned"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
+dependencies = [
+ "serde_core",
+]
+
[[package]]
name = "sha2"
version = "0.10.9"
@@ -1327,9 +1338,9 @@ dependencies = [
[[package]]
name = "siphasher"
-version = "0.3.11"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
+checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e"
[[package]]
name = "smawk"
@@ -1458,11 +1469,17 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.5.11"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
+checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
dependencies = [
- "serde",
+ "indexmap",
+ "serde_core",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_parser",
+ "toml_writer",
+ "winnow",
]
[[package]]
@@ -1495,6 +1512,12 @@ dependencies = [
"winnow",
]
+[[package]]
+name = "toml_writer"
+version = "1.0.6+spec-1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
+
[[package]]
name = "typed-builder"
version = "0.23.2"
@@ -1529,16 +1552,15 @@ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]
name = "uniffi"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3291800a6b06569f7d3e15bdb6dc235e0f0c8bd3eb07177f430057feb076415f"
+checksum = "dc5f2297ee5b893405bed1a6929faec4713a061df158ecf5198089f23910d470"
dependencies = [
"anyhow",
"camino",
"cargo_metadata",
"clap",
"uniffi_bindgen",
- "uniffi_build",
"uniffi_core",
"uniffi_macros",
"uniffi_pipeline",
@@ -1551,19 +1573,11 @@ dependencies = [
"uniffi",
]
-[[package]]
-name = "uniffi-builder-macro"
-version = "0.1.0"
-dependencies = [
- "quote",
- "syn 2.0.110",
-]
-
[[package]]
name = "uniffi_bindgen"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a04b99fa7796eaaa7b87976a0dbdd1178dc1ee702ea00aca2642003aef9b669e"
+checksum = "8bc0c60a9607e7ab77a2ad47ec5530178015014839db25af7512447d2238016c"
dependencies = [
"anyhow",
"askama",
@@ -1585,22 +1599,11 @@ dependencies = [
"uniffi_udl",
]
-[[package]]
-name = "uniffi_build"
-version = "0.29.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "025a05cba02ee22b6624ac3d257e59c7395319ea8fe1aae33a7cdb4e2a3016cc"
-dependencies = [
- "anyhow",
- "camino",
- "uniffi_bindgen",
-]
-
[[package]]
name = "uniffi_core"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f38a9a27529ccff732f8efddb831b65b1e07f7dea3fd4cacd4a35a8c4b253b98"
+checksum = "77baf5d539fe2e1ad6805e942dbc5dbdeb2b83eb5f2b3a6535d422ca4b02a12f"
dependencies = [
"anyhow",
"bytes",
@@ -1610,9 +1613,9 @@ dependencies = [
[[package]]
name = "uniffi_internal_macros"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09acd2ce09c777dd65ee97c251d33c8a972afc04873f1e3b21eb3492ade16933"
+checksum = "b4b42137524f4be6400fcaca9d02c1d4ecb6ad917e4013c0b93235526d8396e5"
dependencies = [
"anyhow",
"indexmap",
@@ -1623,9 +1626,9 @@ dependencies = [
[[package]]
name = "uniffi_macros"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5596f178c4f7aafa1a501c4e0b96236a96bc2ef92bdb453d83e609dad0040152"
+checksum = "d9273ec45330d8fe9a3701b7b983cea7a4e218503359831967cb95d26b873561"
dependencies = [
"camino",
"fs-err",
@@ -1640,9 +1643,9 @@ dependencies = [
[[package]]
name = "uniffi_meta"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "beadc1f460eb2e209263c49c4f5b19e9a02e00a3b2b393f78ad10d766346ecff"
+checksum = "431d2f443e7828a6c29d188de98b6771a6491ee98bba2d4372643bf93f988a18"
dependencies = [
"anyhow",
"siphasher",
@@ -1652,9 +1655,9 @@ dependencies = [
[[package]]
name = "uniffi_pipeline"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd76b3ac8a2d964ca9fce7df21c755afb4c77b054a85ad7a029ad179cc5abb8a"
+checksum = "761ef74f6175e15603d0424cc5f98854c5baccfe7bf4ccb08e5816f9ab8af689"
dependencies = [
"anyhow",
"heck",
@@ -1665,9 +1668,9 @@ dependencies = [
[[package]]
name = "uniffi_udl"
-version = "0.29.5"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4319cf905911d70d5b97ce0f46f101619a22e9a189c8c46d797a9955e9233716"
+checksum = "68773ec0e1c067b6505a73bbf6a5782f31a7f9209333a0df97b87565c46bf370"
dependencies = [
"anyhow",
"textwrap",
diff --git a/Cargo.toml b/Cargo.toml
index 909bb8a8b..efc26817c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,11 +7,11 @@ members = [
"python",
"uniffi/uniffi-bindgen",
"uniffi/devolutions-crypto-uniffi",
- "uniffi/devolutions-crypto-uniffi/uniffi-builder-macro",
]
[workspace.dependencies]
-uniffi = "0.29.1"
+uniffi = "0.31.1"
+rust-argon2 = { version = "3.0", default-features = false }
[package]
name = "devolutions-crypto"
@@ -50,7 +50,7 @@ rand = "0.9"
rand_08 = { package = "rand", version = "0.8" }
thiserror = "2.0.12"
typed-builder = "0.23.2"
-rust-argon2 = { version = "3.0", default-features = false }
+rust-argon2 = { workspace = true }
ed25519-dalek = { version = "2", features = [ "rand_core" ] }
x25519-dalek = { version = "2", features = [ "static_secrets" ] }
diff --git a/uniffi/devolutions-crypto-uniffi/Cargo.toml b/uniffi/devolutions-crypto-uniffi/Cargo.toml
index ab404c42e..0d1b3ea17 100644
--- a/uniffi/devolutions-crypto-uniffi/Cargo.toml
+++ b/uniffi/devolutions-crypto-uniffi/Cargo.toml
@@ -8,8 +8,5 @@ crate-type = ["cdylib", "staticlib"]
[dependencies]
devolutions-crypto = { path = "../../" }
-uniffi-builder-macro = { path = "./uniffi-builder-macro" }
uniffi = { workspace = true }
-
-[build-dependencies]
-uniffi = { workspace = true, features = ["build"] }
+rust-argon2 = { workspace = true }
diff --git a/uniffi/devolutions-crypto-uniffi/build.rs b/uniffi/devolutions-crypto-uniffi/build.rs
deleted file mode 100644
index 3f64bede2..000000000
--- a/uniffi/devolutions-crypto-uniffi/build.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-fn main() {
- uniffi::generate_scaffolding("src/devolutions_crypto.udl").unwrap();
-}
diff --git a/uniffi/devolutions-crypto-uniffi/src/argon2parameters.rs b/uniffi/devolutions-crypto-uniffi/src/argon2parameters.rs
index bb47d9e52..8e69df5ec 100644
--- a/uniffi/devolutions-crypto-uniffi/src/argon2parameters.rs
+++ b/uniffi/devolutions-crypto-uniffi/src/argon2parameters.rs
@@ -1,42 +1,133 @@
-use crate::Result;
+use crate::{Argon2Variant, Argon2Version, Result};
+use std::sync::{Arc, Mutex};
-use devolutions_crypto::{Argon2Variant, Argon2Version};
+#[derive(uniffi::Object)]
+pub struct Argon2ParametersBuilder {
+ length: Mutex