mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 21:13:44 +02:00
cleanup
This commit is contained in:
parent
51faf9b2da
commit
9afcc5dda3
2 changed files with 1 additions and 2 deletions
|
@ -49,6 +49,7 @@ impl<const ROUNDS: usize> Salsa<ROUNDS> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
pub fn crypt(&mut self, mut plaintext: &[u8], mut ciphertext: &mut [u8]) {
|
pub fn crypt(&mut self, mut plaintext: &[u8], mut ciphertext: &mut [u8]) {
|
||||||
let (j0, j1, j2, j3, j4, j5, j6, j7, mut j8, mut j9, j10, j11, j12, j13, j14, j15) = (
|
let (j0, j1, j2, j3, j4, j5, j6, j7, mut j8, mut j9, j10, j11, j12, j13, j14, j15) = (
|
||||||
self.state[0],
|
self.state[0],
|
||||||
|
|
|
@ -19,7 +19,6 @@ pub const ED25519_SIGNATURE_SIZE: usize = 64;
|
||||||
pub struct X25519KeyPair(x25519_dalek::StaticSecret, Secret<32>, x25519_dalek::PublicKey);
|
pub struct X25519KeyPair(x25519_dalek::StaticSecret, Secret<32>, x25519_dalek::PublicKey);
|
||||||
|
|
||||||
impl X25519KeyPair {
|
impl X25519KeyPair {
|
||||||
#[inline(always)]
|
|
||||||
pub fn generate() -> X25519KeyPair {
|
pub fn generate() -> X25519KeyPair {
|
||||||
let sk = x25519_dalek::StaticSecret::new(SecureRandom::get());
|
let sk = x25519_dalek::StaticSecret::new(SecureRandom::get());
|
||||||
let sk2 = Secret(sk.to_bytes());
|
let sk2 = Secret(sk.to_bytes());
|
||||||
|
@ -96,7 +95,6 @@ impl Clone for X25519KeyPair {
|
||||||
pub struct Ed25519KeyPair(ed25519_dalek::Keypair, Secret<32>);
|
pub struct Ed25519KeyPair(ed25519_dalek::Keypair, Secret<32>);
|
||||||
|
|
||||||
impl Ed25519KeyPair {
|
impl Ed25519KeyPair {
|
||||||
#[inline(always)]
|
|
||||||
pub fn generate() -> Ed25519KeyPair {
|
pub fn generate() -> Ed25519KeyPair {
|
||||||
let mut rng = SecureRandom::get();
|
let mut rng = SecureRandom::get();
|
||||||
let kp = ed25519_dalek::Keypair::generate(&mut rng);
|
let kp = ed25519_dalek::Keypair::generate(&mut rng);
|
||||||
|
|
Loading…
Add table
Reference in a new issue