diff --git a/Cargo.toml b/Cargo.toml index 6913748..f61ddcf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cryptohelpers" -version = "1.1.0" +version = "1.1.1" license= "MIT" description = "Collection of helpers and simplifying functions for cryptography things" authors = ["Avril "] @@ -34,7 +34,7 @@ full = [ "rsa" ] -serialise = ["serde_derive"] +serialise = ["serde_derive","serde"] sha256 = ["sha2"] password = ["sha256", "pbkdf2", "hex-literal", "hmac", "getrandom"] diff --git a/src/lib.rs b/src/lib.rs index 02c2281..9ddeedd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ mod bytes; #[allow(unused_imports)] mod error; -#[cfg(feature="serde")] +#[cfg(feature="serialise")] use serde_derive::{ Serialize, Deserialize, }; diff --git a/src/sha256.rs b/src/sha256.rs index a05a934..54159f4 100644 --- a/src/sha256.rs +++ b/src/sha256.rs @@ -20,7 +20,8 @@ const SIZE: usize = consts::SHA256_SIZE; /// Represents a SHA256 hash #[derive(Clone, Copy, Default, PartialEq, Eq, Hash, Debug)] #[repr(C, packed)] -#[cfg_attr(feature="serde", derive(Serialize,Deserialize))] +#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))] + pub struct Sha256Hash { hash: [u8; SIZE],