Encryption 101: The Spy Games for Beginners

By Agent X, Spy Games for Beginners

Welcome, young spies, to the world of encryption! In this tutorial, you'll learn the basics of encryption, from the simplest methods to the most advanced. By the end of this course, you'll be able to encode and decode like a pro!

				public function encode(message) {
				return atbash(message);
				}
				function atbash(cipher) {
				var encoded = "";
				for (var i = 0; i < cipher.length; i++) {
					var char = cipher[i];
					if (/[a-z]/.test(char)) {
						encoded += String.fromCharCode(219 - char.charCodeAt(0));
					} else {
						encoded += char;
					}
				}
				return encoded;
				}