mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
ran cargo fmt
This commit is contained in:
parent
b5d8290df7
commit
15a80d9a12
1 changed files with 7 additions and 4 deletions
|
@ -74,8 +74,7 @@ impl AesGmacSiv {
|
||||||
|
|
||||||
/// Reset to prepare for another encrypt or decrypt operation.
|
/// Reset to prepare for another encrypt or decrypt operation.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn reset(&mut self) {
|
pub fn reset(&mut self) {}
|
||||||
}
|
|
||||||
|
|
||||||
/// Initialize for encryption.
|
/// Initialize for encryption.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -83,7 +82,9 @@ impl AesGmacSiv {
|
||||||
self.tag[0..8].copy_from_slice(iv);
|
self.tag[0..8].copy_from_slice(iv);
|
||||||
self.tag[8..12].fill(0);
|
self.tag[8..12].fill(0);
|
||||||
unsafe {
|
unsafe {
|
||||||
self.gmac.cipher_init::<true>(ptr::null_mut(), ptr::null_mut(), self.tag[0..12].as_ptr()).unwrap();
|
self.gmac
|
||||||
|
.cipher_init::<true>(ptr::null_mut(), ptr::null_mut(), self.tag[0..12].as_ptr())
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +177,9 @@ impl AesGmacSiv {
|
||||||
self.tmp[12] &= 0x7f;
|
self.tmp[12] &= 0x7f;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
self.ctr.cipher_init::<false>(ptr::null_mut(), ptr::null_mut(), self.tmp.as_ptr()).unwrap();
|
self.ctr
|
||||||
|
.cipher_init::<false>(ptr::null_mut(), ptr::null_mut(), self.tmp.as_ptr())
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut tag_tmp = [0_u8; 16];
|
let mut tag_tmp = [0_u8; 16];
|
||||||
|
|
Loading…
Add table
Reference in a new issue