Skip to content

Commit b31542d

Browse files
Optimize performance and improve integration in codesafe library
- Optimized encryption and decryption by pre-calculating mapping tables and using `str.translate` for bulk character operations. - Improved `safe_eval` by pre-filtering builtins and reducing overhead. - Added support for `bytes` in `encrypt` and stream objects (IO) in `run` and `decrypt_to_file`. - Replaced `print` statements with appropriate exceptions for better library integration. - Refined regex for more robust detection of encrypted code in files. - Added new test cases for bytes and stream support. Co-authored-by: Infinitode <107624055+Infinitode@users.noreply.github.com>
1 parent 36f350d commit b31542d

2 files changed

Lines changed: 178 additions & 152 deletions

File tree

0 commit comments

Comments
 (0)