Skip to content

markmcgookin/circuitpython-easycrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

easycrypt

A tiny little python class for encrypting and decrypting a string

USAGE

import EasyCrypt

keystring = "SixteenByteKey!!"
inpstring = "Some super secret string, that I don't want you to see."

# This is the initialisation vector/nonce. I generated it with the below code. As you 
#  will need it to decrypt later on, you might want to store it and not just generate it each time
#  I just generated it like this and printed this one out to store it.
#  
#  import os
#  from binascii import hexlify, unhexlify
#  ivstring = hexlify(os.urandom(16)).decode()

ivstring = "aba0a3bde34a03487eda3ec96d5736a8"

crypted = EasyCrypt.encrypt_string(keystring, inpstring, ivstring)
print(crypted)

decrypted = EasyCrypt.decrypt_string(keystring, crypted, ivstring)
print(decrypted)

About

A simple wrapper for text encryption in CircuitPython

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages