Created
June 11, 2020 07:33
-
-
Save av-gantimurov/4e35bb62ab2a93a4506c3c63627fa3b2 to your computer and use it in GitHub Desktop.
python3 xor algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import itertools | |
def xor(data, key): | |
return bytearray(a ^ b for a, b in zip(data, itertools.cycle(key))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment