Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto-common: rename serializable_state module to hazmat #1487

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 10 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ members = [
]

[patch.crates-io]
crypto-common = { path = "./crypto-common" }
digest = { path = "./digest" }
signature = { path = "./signature" }
File renamed without changes.
9 changes: 3 additions & 6 deletions crypto-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#[cfg(feature = "std")]
extern crate std;

/// Hazardous materials.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this here for now to avoid modifying the now hazmat.rs but it would be good to move the comment into there in a followup commit

pub mod hazmat;

#[cfg(feature = "getrandom")]
pub use getrandom;
#[cfg(feature = "rand_core")]
Expand All @@ -29,12 +32,6 @@ use hybrid_array::{
#[cfg(feature = "rand_core")]
use rand_core::CryptoRngCore;

mod serializable_state;
pub use serializable_state::{
AddSerializedStateSize, DeserializeStateError, SerializableState, SerializedState,
SubSerializedStateSize,
};

/// Block on which [`BlockSizeUser`] implementors operate.
pub type Block<B> = Array<u8, <B as BlockSizeUser>::BlockSize>;

Expand Down
4 changes: 2 additions & 2 deletions digest/src/core_api/ct_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use core::{
};
use crypto_common::{
array::{Array, ArraySize},
hazmat::{DeserializeStateError, SerializableState, SerializedState, SubSerializedStateSize},
typenum::{IsLess, IsLessOrEqual, Le, LeEq, NonZero, Sum, U1, U256},
Block, BlockSizeUser, DeserializeStateError, OutputSizeUser, SerializableState,
SerializedState, SubSerializedStateSize,
Block, BlockSizeUser, OutputSizeUser,
};

/// Dummy type used with [`CtVariableCoreWrapper`] in cases when
Expand Down
4 changes: 2 additions & 2 deletions digest/src/core_api/rt_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use core::{
fmt,
ops::{Add, Sub},
};
use crypto_common::SubSerializedStateSize;
use crypto_common::{
array::{Array, ArraySize},
hazmat::{DeserializeStateError, SerializableState, SerializedState, SubSerializedStateSize},
typenum::{Diff, IsLess, Le, NonZero, Sum, Unsigned, U1, U256},
AddBlockSize, DeserializeStateError, SerializableState, SerializedState, SubBlockSize,
AddBlockSize, SubBlockSize,
};
#[cfg(feature = "zeroize")]
use zeroize::ZeroizeOnDrop;
Expand Down
4 changes: 2 additions & 2 deletions digest/src/core_api/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use core::{
};
use crypto_common::{
array::{Array, ArraySize},
hazmat::{DeserializeStateError, SerializableState, SerializedState, SubSerializedStateSize},
typenum::{Diff, IsLess, Le, NonZero, Sum, U1, U256},
BlockSizeUser, DeserializeStateError, InvalidLength, Key, KeyInit, KeySizeUser, Output,
SerializableState, SerializedState, SubSerializedStateSize,
BlockSizeUser, InvalidLength, Key, KeyInit, KeySizeUser, Output,
};

#[cfg(feature = "mac")]
Expand Down
Loading