chore: re-org u2f code
This commit is contained in:
@@ -117,9 +117,7 @@ impl U2fV2Challenge {
|
||||
if with_time_stamp_prefix {
|
||||
let timestamp = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap().as_millis() as u64;
|
||||
let timestamp_be_bytes = timestamp.to_be_bytes();
|
||||
for i in 0..8 {
|
||||
rand_bytes[i] = timestamp_be_bytes[i];
|
||||
}
|
||||
rand_bytes[..8].clone_from_slice(×tamp_be_bytes[..8]);
|
||||
}
|
||||
|
||||
let challenge = base64::encode_config(&rand_bytes, URL_SAFE_NO_PAD);
|
||||
|
||||
Reference in New Issue
Block a user