Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 628 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 628 Bytes

Lowsec: low-security encryption

Usage example

echo 'Hello world' | lowsec enc 'my secret key' > 'hello.txt.encrypted'

Now hello.txt.encrypted contains something that looks like gibberish.

cat 'hello.txt.encrypted' | lowsec dec 'my secret key' > 'hello.txt'

Now hello.txt contains 'Hello world'.

import lowsec
secret = 'My Secret Key'.encode('utf-8')

text = '''This text should be encrypted.'''.encode('utf-8')
ciphertext = lowsec.enc(secret, text)

print(ciphertext) # gibberish

cleartext = lowsec.dec(secret, ciphertext)

print(text == cleartext)
print(cleartext.decode('utf-8')