diff --git a/ferveo/src/bindings_python.rs b/ferveo/src/bindings_python.rs index d746fd1c..0c5db521 100644 --- a/ferveo/src/bindings_python.rs +++ b/ferveo/src/bindings_python.rs @@ -268,7 +268,7 @@ pub fn decrypt_with_shared_secret( } #[pyclass(module = "ferveo")] -struct FerveoVariant {} +pub struct FerveoVariant {} #[pymethods] impl FerveoVariant { @@ -283,6 +283,13 @@ impl FerveoVariant { } } +impl FerveoVariant { + pub fn inner_form_string(variant: &str) -> PyResult { + api::FerveoVariant::from_string(variant) + .map_err(|err| FerveoPythonError::FerveoError(err).into()) + } +} + #[pyclass(module = "ferveo")] #[derive(derive_more::AsRef)] pub struct SharedSecret(api::SharedSecret);