Removed stream ciphers

This commit is contained in:
TiagoRG 2023-02-28 18:40:23 +00:00
parent 7cea1f379e
commit 317d91f0e9
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
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:])