mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
refactor(dynamic): enhance path resolution, telemetry, and file handling for better compatibility and clarity
This commit is contained in:
parent
8abb023dd0
commit
8211d4fd47
12 changed files with 217 additions and 39 deletions
|
|
@ -106,10 +106,14 @@ fn nyx_payload() -> String {{
|
|||
/// Minimal base64 decoder (no external deps).
|
||||
fn b64_decode(input: &[u8]) -> Option<Vec<u8>> {{
|
||||
const TABLE: [u8; 128] = {{
|
||||
// `while` loop (not `for`) so the initializer stays inside what stable
|
||||
// Rust permits in a `const` context: `IntoIterator::into_iter` is not a
|
||||
// const fn, so a `for` loop here fails with E0015.
|
||||
let mut t = [255u8; 128];
|
||||
let mut i = 0u8;
|
||||
for &c in b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" {{
|
||||
t[c as usize] = i;
|
||||
let alphabet: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
let mut i = 0usize;
|
||||
while i < alphabet.len() {{
|
||||
t[alphabet[i] as usize] = i as u8;
|
||||
i += 1;
|
||||
}}
|
||||
t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue