use to_be_bytes for build_time_bytes

This commit is contained in:
Carson McManus 2021-07-31 11:47:37 -04:00
parent fcc56d6d73
commit 67a7b9b0ee

View file

@ -46,13 +46,8 @@ pub struct SteamGuardAccount {
pub session: Option<steamapi::Session>,
}
fn build_time_bytes(mut time: i64) -> [u8; 8] {
let mut bytes: [u8; 8] = [0; 8];
for i in (0..8).rev() {
bytes[i] = time as u8;
time >>= 8;
}
return bytes
fn build_time_bytes(time: i64) -> [u8; 8] {
return time.to_be_bytes();
}
pub fn parse_shared_secret(secret: String) -> anyhow::Result<[u8; 20]> {