Skip to content

Encryption and decryption on the key of the python module

License

Notifications You must be signed in to change notification settings

alserious/CryptoPyCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptopycode

Script for encryption and decryption Python modules

You need to install the pip package

pip install cryptopycode

Can be used as commands for python

python3 -m cryptopycode --help
python3 -m cryptopycode -n secret.py -k encrypt
python3 -m cryptopycode -n secured.py -k decrypt

Can be imported to you project

imports

import os

from cryptopycode import CryptoModule

get crypto module instance

crypto_module = CryptoModule()

encrypt

open decrypted file with name "secret.py" and create encrypted file with name "secured.py"

crypto_module.create_secured_module(
    path_to_opened_module=os.path.join(
        os.path.abspath(os.path.dirname(__file__)), "secret.py"
    ),
    path_to_secured_module=os.path.join(
        os.path.abspath(os.path.dirname(__file__)), "secured.py"
    ),
    create_key=True,
    delete_source_opened_module=False,
)

decrypt

open encrypted file with name "secured.py" and create decrypted file with name "secret.py"

crypto_module.create_opened_module(
    path_to_secured_module=os.path.join(
        os.path.abspath(os.path.dirname(__file__)), "secured.py"
    ),
    path_to_opened_module=os.path.join(
        os.path.abspath(os.path.dirname(__file__)), "secret.py"
    ),
)

About

Encryption and decryption on the key of the python module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages