mirror of https://github.com/ospab/ostp.git
test: add obfuscation round-trip tests, fix i18n module import
- 7 passing tests verify client-server compatibility: * Handshake obfuscation round-trip (correct key recovers session_id) * Wrong key produces garbage (prevents unauthorized probes) * Data packet obfuscation round-trip * Deterministic derivation (same key = same secrets) * Different keys produce different secrets * Legacy API consistency * Padding range validation (100 random keys) - Fixed test module import path to use crate::crypto::obfuscation::* - Added i18n.js module for GUI localization
This commit is contained in:
parent
69e4426152
commit
49d97dbee3
|
|
@ -198,3 +198,7 @@ pub fn deobfuscate_packet_inplace(raw: &mut [u8], key: &[u8; 8], is_handshake: b
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "obfuscation_tests.rs"]
|
||||
mod obfuscation_tests;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::crypto::obfuscation::*;
|
||||
|
||||
/// Verifies that derive_all_secrets is deterministic — same input always
|
||||
/// produces the same output.
|
||||
|
|
|
|||
Loading…
Reference in New Issue