mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
finished import
This commit is contained in:
parent
c8cb45128e
commit
a507212276
4 changed files with 3154 additions and 3136 deletions
|
@ -3,9 +3,8 @@ use std::ptr;
|
|||
|
||||
use foreign_types::ForeignType;
|
||||
|
||||
use crate::cipher_ctx::CipherCtx;
|
||||
use crate::{cipher_ctx::CipherCtx, ZEROES};
|
||||
|
||||
pub const ZEROES: [u8; 64] = [0_u8; 64];
|
||||
|
||||
/// AES-GMAC-SIV encryptor/decryptor.
|
||||
pub struct AesGmacSiv {
|
File diff suppressed because it is too large
Load diff
3131
crypto/src/aes_tests.rs
Normal file
3131
crypto/src/aes_tests.rs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,6 @@ mod cipher_ctx;
|
|||
mod bn;
|
||||
mod ec;
|
||||
|
||||
pub mod aes_gmac_siv;
|
||||
pub mod secret;
|
||||
pub mod random;
|
||||
pub mod hash;
|
||||
|
@ -16,7 +15,27 @@ pub mod salsa;
|
|||
pub mod typestate;
|
||||
pub mod x25519;
|
||||
|
||||
pub mod aes;
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod aes_fruity;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
pub mod aes_openssl;
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use aes_fruity as aes;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
pub use aes_openssl as aes;
|
||||
|
||||
mod aes_tests;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod aes_gmac_siv_fruity;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
pub mod aes_gmac_siv_openssl;
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use aes_gmac_siv_fruity as aes_gmac_siv;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
pub use aes_gmac_siv_openssl as aes_gmac_siv;
|
||||
|
||||
|
||||
|
||||
|
||||
/// This must be called before using any function from this library.
|
||||
|
@ -38,3 +57,4 @@ pub fn secure_eq<A: AsRef<[u8]> + ?Sized, B: AsRef<[u8]> + ?Sized>(a: &A, b: &B)
|
|||
false
|
||||
}
|
||||
}
|
||||
pub const ZEROES: [u8; 64] = [0_u8; 64];
|
||||
|
|
Loading…
Add table
Reference in a new issue