Remove live code & console.log (Backtracking, Bit-manipulation, Ciphers).

This commit is contained in:
Eric Lavault
2021-10-09 17:47:03 +02:00
parent 7f6a53ad4a
commit 5c4be7604d
8 changed files with 35 additions and 33 deletions

View File

@ -20,7 +20,13 @@ function XOR (str, key) {
return result
}
const encryptedString = XOR('test string', 32)
console.log('Encrypted: ', encryptedString)
const decryptedString = XOR(encryptedString, 32)
console.log('Decrypted: ', decryptedString)
export { XOR }
// Nb: Node REPL might not output the null char '\x00' (charcode 0)
// > XOR('test string', 32)
// 'TEST\x00STRING'
// > XOR('TEST\x00STRING', 32)
// 'test string'