tokio-1.0
Avril 4 years ago
parent 590fcedf81
commit 66d9ff4774
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
[package] [package]
name = "cryptohelpers" name = "cryptohelpers"
version = "1.1.0" version = "1.1.1"
license= "MIT" license= "MIT"
description = "Collection of helpers and simplifying functions for cryptography things" description = "Collection of helpers and simplifying functions for cryptography things"
authors = ["Avril <flanchan@cumallover.me>"] authors = ["Avril <flanchan@cumallover.me>"]
@ -34,7 +34,7 @@ full = [
"rsa" "rsa"
] ]
serialise = ["serde_derive"] serialise = ["serde_derive","serde"]
sha256 = ["sha2"] sha256 = ["sha2"]
password = ["sha256", "pbkdf2", "hex-literal", "hmac", "getrandom"] password = ["sha256", "pbkdf2", "hex-literal", "hmac", "getrandom"]

@ -24,7 +24,7 @@ mod bytes;
#[allow(unused_imports)] #[allow(unused_imports)]
mod error; mod error;
#[cfg(feature="serde")] #[cfg(feature="serialise")]
use serde_derive::{ use serde_derive::{
Serialize, Deserialize, Serialize, Deserialize,
}; };

@ -20,7 +20,8 @@ const SIZE: usize = consts::SHA256_SIZE;
/// Represents a SHA256 hash /// Represents a SHA256 hash
#[derive(Clone, Copy, Default, PartialEq, Eq, Hash, Debug)] #[derive(Clone, Copy, Default, PartialEq, Eq, Hash, Debug)]
#[repr(C, packed)] #[repr(C, packed)]
#[cfg_attr(feature="serde", derive(Serialize,Deserialize))] #[cfg_attr(feature="serialise", derive(Serialize,Deserialize))]
pub struct Sha256Hash pub struct Sha256Hash
{ {
hash: [u8; SIZE], hash: [u8; SIZE],

Loading…
Cancel
Save