diff --git a/Cargo.toml b/Cargo.toml index 23506fe..29baafe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cryptohelpers" -version = "1.4.1" +version = "1.5.0" license= "MIT" description = "Collection of helpers and simplifying functions for cryptography things" authors = ["Avril "] diff --git a/src/rsa/.#offsets.rs b/src/rsa/.#offsets.rs new file mode 120000 index 0000000..fe9f60a --- /dev/null +++ b/src/rsa/.#offsets.rs @@ -0,0 +1 @@ +avril@eientei.17525:1601576110 \ No newline at end of file diff --git a/src/rsa/offsets.rs b/src/rsa/offsets.rs index 0471e50..f2eaed6 100644 --- a/src/rsa/offsets.rs +++ b/src/rsa/offsets.rs @@ -1,4 +1,7 @@ //! Traits for offsets of components +use super::*; + +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] pub struct Starts(T); diff --git a/src/rsa/private.rs b/src/rsa/private.rs index ad4851f..dc961b8 100644 --- a/src/rsa/private.rs +++ b/src/rsa/private.rs @@ -51,6 +51,7 @@ use tokio::{ /// It is always assumed that the internal consistancy and state of the components binary representations is correct. /// Incorrect internal state can cause panics on all operations. #[derive(Clone, PartialEq, Eq, Hash, Debug)] +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] pub struct RsaPrivateKey { data: Vec, diff --git a/src/rsa/private_offsets.rs b/src/rsa/private_offsets.rs index bb8f885..940ec59 100644 --- a/src/rsa/private_offsets.rs +++ b/src/rsa/private_offsets.rs @@ -1,7 +1,9 @@ //! Private offsets use super::offsets::*; +use super::*; #[derive(Clone,Copy,Debug,Eq,PartialEq,Hash,Default)] +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] pub struct PrivateOffsetGroup { pub n: usize, diff --git a/src/rsa/public.rs b/src/rsa/public.rs index 5edc205..b332865 100644 --- a/src/rsa/public.rs +++ b/src/rsa/public.rs @@ -47,6 +47,7 @@ use tokio::{ /// It is always assumed that the internal consistancy and state of the components binary representations is correct. /// Incorrect internal state can cause panics on all operations. #[derive(Clone, PartialEq, Eq, Hash, Debug)] +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] pub struct RsaPublicKey { data: Vec, diff --git a/src/rsa/public_offsets.rs b/src/rsa/public_offsets.rs index b413f6c..3a954d0 100644 --- a/src/rsa/public_offsets.rs +++ b/src/rsa/public_offsets.rs @@ -1,7 +1,9 @@ //! Offsets for a public key container use super::offsets::*; +use super::*; #[derive(Clone,Copy,Debug,Eq,PartialEq,Hash,Default)] +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] pub struct PublicOffsetGroup { pub n: usize,