From 80d49a76073d417e118b85636df2a923043b0250 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 30 Apr 2022 21:30:45 -0500 Subject: azalea_auth::encryption -> azalea_crypto --- azalea-protocol/src/connect.rs | 4 ++-- azalea-protocol/src/read.rs | 4 ++-- azalea-protocol/src/write.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index c55f2e90..e9d898d6 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -7,7 +7,7 @@ use crate::packets::status::StatusPacket; use crate::read::read_packet; use crate::write::write_packet; use crate::ServerIpAddress; -use azalea_auth::encryption::{Aes128CfbDec, Aes128CfbEnc}; +use azalea_crypto::{Aes128CfbDec, Aes128CfbEnc}; use tokio::net::TcpStream; pub enum PacketFlow { @@ -159,7 +159,7 @@ impl LoginConnection { pub fn set_encryption_key(&mut self, key: [u8; 16]) { // minecraft has a cipher decoder and encoder, i don't think it matters though? - let (enc_cipher, dec_cipher) = azalea_auth::encryption::create_cipher(&key); + let (enc_cipher, dec_cipher) = azalea_crypto::create_cipher(&key); self.enc_cipher = Some(enc_cipher); self.dec_cipher = Some(dec_cipher); } diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 2a74d8de..9afdb0e9 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -6,7 +6,7 @@ use std::{ use crate::{connect::PacketFlow, mc_buf::Readable, packets::ProtocolPacket}; use async_compression::tokio::bufread::ZlibDecoder; -use azalea_auth::encryption::Aes128CfbDec; +use azalea_crypto::Aes128CfbDec; use tokio::io::{AsyncRead, AsyncReadExt}; async fn frame_splitter(mut stream: &mut R) -> Result, String> @@ -122,7 +122,7 @@ where // (but only on linux and release mode for some reason LMAO) if buf.remaining() == 0 { if let Some(cipher) = self.as_mut().cipher.get_mut() { - azalea_auth::encryption::decrypt_packet(cipher, buf.filled_mut()); + azalea_crypto::decrypt_packet(cipher, buf.filled_mut()); } } match r { diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index e39ce18e..38ef174c 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -1,6 +1,6 @@ use crate::{mc_buf::Writable, packets::ProtocolPacket, read::MAXIMUM_UNCOMPRESSED_LENGTH}; use async_compression::tokio::bufread::ZlibEncoder; -use azalea_auth::encryption::Aes128CfbEnc; +use azalea_crypto::Aes128CfbEnc; use std::fmt::Debug; use tokio::{ io::{AsyncReadExt, AsyncWrite, AsyncWriteExt}, @@ -67,7 +67,7 @@ pub async fn write_packet( } // if we were given a cipher, encrypt the packet if let Some(cipher) = cipher { - azalea_auth::encryption::encrypt_packet(cipher, &mut buf); + azalea_crypto::encrypt_packet(cipher, &mut buf); } buf = frame_prepender(&mut buf).unwrap(); stream.write_all(&buf).await.unwrap(); -- cgit v1.2.3