tokio-1.0
Avril 4 years ago
parent 9f4dfc187f
commit df5536819b
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
[package] [package]
name = "cryptohelpers" name = "cryptohelpers"
version = "1.3.0" version = "1.3.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>"]

@ -30,6 +30,7 @@ const BLOCKSIZE: usize = 16;
/// A key and IV for the AES algorithm /// A key and IV for the AES algorithm
#[derive(Debug, PartialEq, Eq, Clone, Hash, Default)] #[derive(Debug, PartialEq, Eq, Clone, Hash, Default)]
#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))]
pub struct AesKey { pub struct AesKey {
key: [u8; KEYSIZE], key: [u8; KEYSIZE],
iv: [u8; IVSIZE], iv: [u8; IVSIZE],

@ -20,6 +20,7 @@ pub const ROUNDS: u32 = consts::PASSWORD_ROUNDS;
/// Represents a password hash /// Represents a password hash
#[derive(Clone, Debug, PartialEq, Eq, Hash, Default)] #[derive(Clone, Debug, PartialEq, Eq, Hash, Default)]
#[repr(transparent)] #[repr(transparent)]
#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))]
pub struct Password { pub struct Password {
derived: [u8; KEYSIZE], derived: [u8; KEYSIZE],
} }
@ -27,6 +28,7 @@ pub struct Password {
/// Represents a salt to be used for password operations /// Represents a salt to be used for password operations
#[derive(Clone, PartialEq, Eq, Hash, Debug)] #[derive(Clone, PartialEq, Eq, Hash, Debug)]
#[repr(transparent)] #[repr(transparent)]
#[cfg_attr(feature="serialise", derive(Serialize,Deserialize))]
pub struct Salt([u8; SALTSIZE]); pub struct Salt([u8; SALTSIZE]);
impl Default for Salt impl Default for Salt

Loading…
Cancel
Save