Skip to content

Commit

Permalink
Bump hybrid-array to v0.2.0-rc.4 (#1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri authored Jan 31, 2024
1 parent 8ff7c6f commit 39a7820
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

8 changes: 2 additions & 6 deletions cipher/src/stream_core.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
use crate::{ParBlocks, ParBlocksSizeUser, StreamCipherError};
use crypto_common::{
array::{slice_as_chunks_mut, Array},
typenum::Unsigned,
Block, BlockSizeUser, BlockSizes,
};
use crypto_common::{array::Array, typenum::Unsigned, Block, BlockSizeUser, BlockSizes};
use inout::{InOut, InOutBuf};

/// Trait implemented by stream cipher backends.
Expand Down Expand Up @@ -213,7 +209,7 @@ impl<'a, BS: BlockSizes> StreamClosure for WriteBlocksCtx<'a, BS> {
#[inline(always)]
fn call<B: StreamBackend<BlockSize = BS>>(self, backend: &mut B) {
if B::ParBlocksSize::USIZE > 1 {
let (chunks, tail) = slice_as_chunks_mut(self.blocks);
let (chunks, tail) = Array::slice_as_chunks_mut(self.blocks);
for chunk in chunks {
backend.gen_par_ks_blocks(chunk);
}
Expand Down
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-rc.0"
hybrid-array = "0.2.0-rc.4"

# optional dependencies
rand_core = { version = "0.6.4", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions universal-hash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub trait UniversalHash: BlockSizeUser + Sized {
fn call<B: UhfBackend<BlockSize = BS>>(self, backend: &mut B) {
let pb = B::ParBlocksSize::USIZE;
if pb > 1 {
let (par_blocks, tail) = array::slice_as_chunks(self.blocks);
let (par_blocks, tail) = Array::slice_as_chunks(self.blocks);
for par_block in par_blocks {
backend.proc_par_blocks(par_block);
}
Expand All @@ -99,7 +99,7 @@ pub trait UniversalHash: BlockSizeUser + Sized {
/// Message Authentication Codes (MACs) based on universal hashing.
#[inline]
fn update_padded(&mut self, data: &[u8]) {
let (blocks, tail) = array::slice_as_chunks(data);
let (blocks, tail) = Array::slice_as_chunks(data);

self.update(blocks);

Expand Down

0 comments on commit 39a7820

Please sign in to comment.