mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Improve Rust code clarity across the workspace
Document public APIs and non-obvious control flow so the protocol, simulator, and macro crates are easier to follow. Tighten a few helper paths and feature gates while preserving behavior and keeping the workspace warning-free.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
const ENV_KEY_NAME: &str = "OBFUSCATION_KEY";
|
||||
const BACKUP_ENV_KEY: &str = "OBFUSCATION_KEY_DO_NOT_USE";
|
||||
|
||||
/// Returns the obfuscation key used by the proc macros.
|
||||
///
|
||||
/// The fallback keeps macro expansion deterministic when the environment variable is absent.
|
||||
pub fn get_encryption_key() -> String {
|
||||
if let Ok(key) = std::env::var(ENV_KEY_NAME) {
|
||||
key
|
||||
|
||||
Reference in New Issue
Block a user