- Corrected file mismatch: write/read now consistently use `lic.enc`
(was writing lic.enc but reading hashes.enc → caused empty read + crash).
- Added bounds checks in `extract_size()` to prevent out-of-bounds access
when encrypted data is too short.
- Standardized size header encoding/decoding to little-endian for consistency.
- Fixed shadowing of `decrypted_hashes` inside try-block.
- Added braces in `read_hashes_from_memory` to avoid always-pushing empty lines.
- Construct decrypted string using explicit size to handle embedded NULs safely.
- Added error handling for failed file I/O (read/write).
- Improved logging to show clear error causes.
- General defensive programming to prevent future segmentation faults.