Skip to content

Low security cipher for learning / teaching purposes

Notifications You must be signed in to change notification settings

FlorianMortgat/lowsec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

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')

About

Low security cipher for learning / teaching purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages