diff options
| author | mat <github@matdoes.dev> | 2022-04-30 21:30:45 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-04-30 21:30:45 -0500 |
| commit | 80d49a76073d417e118b85636df2a923043b0250 (patch) | |
| tree | 8e27492a181d82fcf524e8b5b5b997e9231e3aed /azalea-protocol/src | |
| parent | cc70d80932269ca3d044224481ab46082e0a8449 (diff) | |
| download | azalea-drasl-80d49a76073d417e118b85636df2a923043b0250.tar.xz | |
azalea_auth::encryption -> azalea_crypto
Diffstat (limited to 'azalea-protocol/src')
| -rwxr-xr-x | azalea-protocol/src/connect.rs | 4 | ||||
| -rwxr-xr-x | azalea-protocol/src/read.rs | 4 | ||||
| -rwxr-xr-x | azalea-protocol/src/write.rs | 4 |
3 files changed, 6 insertions, 6 deletions
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<R: ?Sized>(mut stream: &mut R) -> Result<Vec<u8>, 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<P, W>( } // 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(); |
