Merge super-mario-maker into v0
Some checks failed
Build and Test / super-mario-maker (push) Failing after 16s
Build and Test / splatoon (push) Has been cancelled
Build and Test / friends (push) Has been cancelled

This commit is contained in:
red binder 2026-04-26 16:12:31 +02:00
commit e129f9c3b3
30 changed files with 2953 additions and 133 deletions

View file

@ -51,6 +51,23 @@ pub fn derive_key(pid: PID, password: &[u8]) -> [u8; 16] {
pub struct KerberosDateTime(pub u64);
impl KerberosDateTime {
pub fn from_u64(val: u64) -> Self {
Self(val)
}
pub fn from_naive(dt: chrono::NaiveDateTime) -> Self {
use chrono::Datelike;
use chrono::Timelike;
Self::new(
dt.second() as u64,
dt.minute() as u64,
dt.hour() as u64,
dt.day() as u64,
dt.month() as u64,
dt.year() as u64,
)
}
pub fn new(second: u64, minute: u64, hour: u64, day: u64, month: u64, year: u64) -> Self {
Self(second | (minute << 6) | (hour << 12) | (day << 17) | (month << 22) | (year << 26))
}