Skip to content

Commit

Permalink
crypto-common: adds an OutputSize type alias (#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Mar 13, 2024
1 parent 7f4f84b commit 6c5f56e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ pub type Block<B> = Array<u8, <B as BlockSizeUser>::BlockSize>;
pub type ParBlocks<T> = Array<Block<T>, <T as ParBlocksSizeUser>::ParBlocksSize>;

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

/// Alias for the output size of [`OutputSizeUser`] implementors.
pub type OutputSize<T> = <T as OutputSizeUser>::OutputSize;

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

0 comments on commit 6c5f56e

Please sign in to comment.