From 66d9ff4774f38e0cd8c419fd3620bcc5c4185b05 Mon Sep 17 00:00:00 2001 From: Avril Date: Wed, 9 Sep 2020 04:30:14 +0100 Subject: [PATCH] um --- Cargo.toml | 4 ++-- src/lib.rs | 2 +- src/sha256.rs | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) 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],