Removed stream ciphers

This commit is contained in:
TiagoRG 2023-02-28 18:40:23 +00:00
parent 405b0e6fc5
commit 65761499c3
2 changed files with 0 additions and 22 deletions

View File

@ -1,22 +0,0 @@
# Screw 1.4 :skull:
import codecs
import os
import sys
from Crypto.Cipher import ARC4
def main(args=None):
with open(args[0], 'r') as f:
text = f.read(2048)
cipher = ARC4.new(bit_array_from_str(args[1]))
cryptogram = cipher.encrypt(text)
os.write(1, cryptogram)
print()
def bit_array_from_str(s):
return [codecs.encode("hex") for elem in s]
if __name__ == '__main__':
main(sys.argv[1:])