XOR encryption implementations for several languages.
Go to file
Grey Lee 15d89e91e8 Fix Objective-C implementation, it has different result comparing to others.
Division operator and modulo operator have the same priority. So the result of "i % sizeof(key)/sizeof(unichar)" is the same as "(i % sizeof(key)) / sizeof(unichar)". But expected result should be "i % (sizeof(key)/sizeof(unichar))".
2017-03-23 11:58:48 +08:00
C Added C implementation 2013-10-06 15:26:38 -04:00
C# Add key array comment 2013-10-06 20:16:14 -04:00
C++ Moved main.cpp to C++ folder 2013-10-06 14:35:50 -04:00
Dart Added Dart implementation 2013-10-06 19:50:34 -04:00
F# F# impl 2015-06-23 13:40:46 +02:00
Go Added Go implementation 2016-07-09 06:34:05 -04:00
Groovy Fixing indentation 2013-10-06 16:44:44 -04:00
Java (Android compatible) Added Java/Android implementation 2013-10-06 14:48:35 -04:00
JavaScript Added JavaScript implementationg 2013-10-06 16:13:22 -04:00
Objective-C Fix Objective-C implementation, it has different result comparing to others. 2017-03-23 11:58:48 +08:00
Python Fixed python to not use a hard coded K char, and to actually use the key array 2013-10-06 16:03:27 -04:00
Ruby Add ruby example 2017-02-05 15:18:15 -06:00
VB.NET Comments Improvements 2016-03-14 22:20:09 +05:30
.gitignore Added Java/Android implementation 2013-10-06 14:48:35 -04:00
LICENSE Update LICENSE 2017-03-06 22:14:12 -05:00
README.md Update README.md 2017-02-05 15:25:52 -06:00

XOR Encryption

Simple implementation of XOR Encryption/Decrypting in various languages, including:

This implementation goes beyond the basic single-key model to use multiple keys in a particular sequence, making it that much more difficult to brute-force.

In these examples, I'm encrypting the same string with the same keys in order to keep consistency with the output, and to demonstrate that an encrypted string from a C program can be decrypted in a Java application, or any combination, so long as the keys remain the same.

For an in-depth explanation of the code, check out KyleWBanks.com.