https://github.com/farinap5/xor-cipher
Simple encoding for files and messages
https://github.com/farinap5/xor-cipher
Last synced: about 2 months ago
JSON representation
Simple encoding for files and messages
- Host: GitHub
- URL: https://github.com/farinap5/xor-cipher
- Owner: farinap5
- Created: 2021-06-02T15:50:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-06T04:05:57.000Z (almost 4 years ago)
- Last Synced: 2025-01-21T00:50:32.536Z (3 months ago)
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
XOR Cipher
Simple encoding for files and messages
---
Do not use in environments that would require secure encryption!```
Simple explanation of how exclusive OR works.LOGIC:
eXclusive OR OR
INPUT|OUTPUT INPUT|OUTPUT
-----|------ -----|------
A B| XOR A B| OR
0 0| 0 0 0| 0
0 1| 1 0 1| 1
1 0| 1 1 0| 1
1 1| 0 1 1| 1ENCODE: DECODE:
abc - 01100001 01100010 01100011 %%% - 00001010 00000111 00011010
key - 01101011 01100101 01111001 key - 01101011 01100101 01111001
-------- -------- -------- -------- -------- --------
%%% - 00001010 00000111 00011010 abc - 01100001 01100010 01100011%%% = any sequence of bytes.
```