fix(useragent): now using new challenge format

This commit is contained in:
Skipper
2026-04-17 18:19:39 +02:00
parent 270e843598
commit cddf9e02ba
14 changed files with 251 additions and 47 deletions

View File

@@ -43,6 +43,14 @@ impl AuthChallenge {
buffer
}
}
pub fn from_parts(nonce: &[u8], timestamp: i64) -> Result<Self, ()> {
let random_nonce = nonce.as_array().ok_or(())?;
Ok(AuthChallenge {
nonce: *random_nonce,
timestamp: DateTime::from_timestamp_nanos(timestamp),
})
}
}
pub type KeyParams = MlDsa87;