steel_protocol/packets/login/s_key.rs
1use steel_macros::{ReadFrom, ServerPacket};
2
3#[derive(ReadFrom, ServerPacket, Clone, Debug)]
4pub struct SKey {
5 #[read(as = Prefixed(VarInt))]
6 pub key: Vec<u8>,
7 #[read(as = Prefixed(VarInt))]
8 pub challenge: Vec<u8>,
9}
10
11impl SKey {
12 #[must_use]
13 pub const fn new(key: Vec<u8>, challenge: Vec<u8>) -> Self {
14 Self { key, challenge }
15 }
16}