You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,46 @@ In this repository I have implemented two simple function just do that, which ta
45
45
46
46
Samewise to decryption, you are going to specify the secret number and then it will recieve your encrypted text input and then render to you decrypted text output
47
47
48
+
# ASCII-based Encryption/Decryption
49
+
50
+
This Python script provides simple ASCII-based encryption and decryption functionalities. The code has been improved to enhance key handling, error checking, and overall robustness.
51
+
52
+
## Improvements
53
+
54
+
### Key Handling
55
+
- The `key` parameter now accepts both strings and bytes, providing more flexibility for different types of keys.
56
+
- The key is automatically encoded if it is provided as a string.
57
+
58
+
### Non-ASCII Characters
59
+
- The script now handles non-ASCII characters more gracefully.
60
+
61
+
### Error Handling
62
+
- Error checks have been added to ensure that both the text and the key are not empty.
63
+
64
+
### Modulo Operation
65
+
- A modulo operation has been introduced to prevent overflow issues during character shifting. This ensures that the character values stay within the valid ASCII range.
0 commit comments