Skip to content

Commit

Permalink
[WIP] Bump hybrid-array to v0.2.0-pre.6
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Dec 30, 2023
1 parent a17da80 commit 9161a69
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 14 deletions.
9 changes: 6 additions & 3 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
"async-signature",
"cipher",
"crypto",
"crypto-common",
#"crypto-common",
"digest",
"elliptic-curve",
"kem",
Expand All @@ -14,9 +14,9 @@ members = [
"signature_derive",
"universal-hash",
]
exclude = ["crypto-common"]

[patch.crates-io]
block-buffer = { git = "https://github.com/RustCrypto/utils.git" }
crypto-common = { path = "crypto-common" }
hybrid-array = { git = "https://github.com/RustCrypto/utils.git" }
#crypto-common = { path = "crypto-common" }
inout = { git = "https://github.com/RustCrypto/utils.git" }
65 changes: 65 additions & 0 deletions crypto-common/Cargo.lock

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

2 changes: 1 addition & 1 deletion crypto-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords = ["crypto", "traits"]
categories = ["cryptography", "no-std"]

[dependencies]
hybrid-array = "=0.2.0-pre.5"
hybrid-array = "=0.2.0-pre.6"

# optional dependencies
rand_core = { version = "0.6.4", optional = true }
Expand Down
10 changes: 5 additions & 5 deletions crypto-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub use hybrid_array::typenum;
use core::fmt;
use hybrid_array::{
typenum::{Diff, Sum, Unsigned},
Array, ArraySize, ByteArray,
Array, ArraySize,
};

#[cfg(feature = "rand_core")]
Expand All @@ -36,19 +36,19 @@ pub use serializable_state::{
};

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

/// Parallel blocks on which [`ParBlocksSizeUser`] implementors operate.
pub type ParBlocks<T> = Array<Block<T>, <T as ParBlocksSizeUser>::ParBlocksSize>;

/// Output array of [`OutputSizeUser`] implementors.
pub type Output<T> = ByteArray<<T as OutputSizeUser>::OutputSize>;
pub type Output<T> = Array<u8, <T as OutputSizeUser>::OutputSize>;

/// Key used by [`KeySizeUser`] implementors.
pub type Key<B> = ByteArray<<B as KeySizeUser>::KeySize>;
pub type Key<B> = Array<u8, <B as KeySizeUser>::KeySize>;

/// Initialization vector (nonce) used by [`IvSizeUser`] implementors.
pub type Iv<B> = ByteArray<<B as IvSizeUser>::IvSize>;
pub type Iv<B> = Array<u8, <B as IvSizeUser>::IvSize>;

/// Alias for `AddBlockSize<A, B> = Sum<T, B::BlockSize>`
pub type AddBlockSize<T, B> = Sum<T, <B as BlockSizeUser>::BlockSize>;
Expand Down
4 changes: 2 additions & 2 deletions crypto-common/src/serializable_state.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::array::{
self,
typenum::{Diff, Prod, Sum, Unsigned, U1, U16, U2, U4, U8},
ArraySize, ByteArray,
Array, ArraySize,
};
use core::{convert::TryInto, default::Default, fmt};

/// Serialized internal state.
pub type SerializedState<T> = ByteArray<<T as SerializableState>::SerializedStateSize>;
pub type SerializedState<T> = Array<u8, <T as SerializableState>::SerializedStateSize>;

/// Alias for `AddSerializedStateSize<T, S> = Sum<T, S::SerializedStateSize>`
pub type AddSerializedStateSize<T, S> = Sum<T, <S as SerializableState>::SerializedStateSize>;
Expand Down

0 comments on commit 9161a69

Please sign in to comment.