{"id":17007466,"url":"https://github.com/wkhallen/easyencrypt","last_synced_at":"2025-03-22T11:46:53.767Z","repository":{"id":57425073,"uuid":"140186459","full_name":"WKHAllen/easyencrypt","owner":"WKHAllen","description":"Easy encryption","archived":false,"fork":false,"pushed_at":"2019-05-31T21:51:58.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T16:12:21.402Z","etag":null,"topics":["aes","cryptography","python","rsa"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WKHAllen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-08T16:58:55.000Z","updated_at":"2019-08-21T17:17:48.000Z","dependencies_parsed_at":"2022-09-13T15:31:11.233Z","dependency_job_id":null,"html_url":"https://github.com/WKHAllen/easyencrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WKHAllen%2Feasyencrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WKHAllen%2Feasyencrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WKHAllen%2Feasyencrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WKHAllen%2Feasyencrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WKHAllen","download_url":"https://codeload.github.com/WKHAllen/easyencrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244952788,"owners_count":20537472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aes","cryptography","python","rsa"],"created_at":"2024-10-14T05:25:51.101Z","updated_at":"2025-03-22T11:46:53.742Z","avatar_url":"https://github.com/WKHAllen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easy Encryption\n\nSource: [https://github.com/WKHAllen/easyencrypt](https://github.com/WKHAllen/easyencrypt)\n\n### Contents\n\nHashing, symmetric encryption, and public/private key encryption functions.\n\n### Dependencies\n\n* [cryptography](https://github.com/pyca/cryptography)\n* [rsa](https://github.com/sybrenstuvel/python-rsa/)\n\n### Installation\n\n`pip install easyencrypt`\n\n### Example\n\n```python\n\u003e\u003e\u003e # hashing\n\u003e\u003e\u003e from easyencrypt import newSalt, hashText\n\u003e\u003e\u003e newSalt()\nb\"b\\xa3\\x1c\\xf5Y\\xe2;\\xb9\\xa6\\xaeUz\\xde\\x88\\x07\\xfe'\\xc9\\xaa\\x96\\xdfBh\\xc9\\xf9\\x04\\xb26\\xff\\xa9zJ\\x17\\xd5\\x01n\\xfeV\\xa7$\\xa8`G\\xfd\\r]\\x8a`\\xeaL4\\x02{\\xd6\\x9b\\xb3\\xa9\\xd9\\x89\\x18;\\xec\\xab\\x83\"\n\u003e\u003e\u003e message = \"Hello, World!\"\n\u003e\u003e\u003e hashText(message, algorithm=\"sha256\")\nb'\\xdf\\xfd`!\\xbb+\\xd5\\xb0\\xafgb\\x90\\x80\\x9e\\xc3\\xa51\\x91\\xdd\\x81\\xc7\\xf7\\nK(h\\x8a6!\\x82\\x98o'\n\u003e\u003e\u003e # symmetric encryption/decryption\n\u003e\u003e\u003e from easyencrypt import newKey, passwordToKey, symmetricEncrypt, symmetricDecrypt\n\u003e\u003e\u003e newKey()\nb'1h8_Z3LcL55r3ljklF_1fhKWy122zqDYWAJyQEZaKlA='\n\u003e\u003e\u003e password = \"password123\"\n\u003e\u003e\u003e key = passwordToKey(password)\n\u003e\u003e\u003e key\nb'75K3eLr-dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8='\n\u003e\u003e\u003e ciphertext = symmetricEncrypt(message, key)\n\u003e\u003e\u003e ciphertext\nb\"\\x80\\x00\\x00\\x00\\x00[B?\\xe7\\xbb\\x825s\\xff\\xf3\\x92AX|$\\xf5\\x19\\x16\\xe7f\\x98\\x8cgND\\xf8\\xdf\\xd4Q\\x00Y\\xe5v\\xb9\\x0e\\xa0\\xa0\\xb8\\x05\\x87N\\xe6\\x19h\\x93K\\xa9\\xdb\\x11\\xef%V\\xc2\\xb1'\\xa4;\\xb8\\xaf\\xd2[\\xdc\\xb2\\xae\\xea\\xca\\xa4z\"\n\u003e\u003e\u003e symmetricDecrypt(ciphertext, key)\nb'Hello, World!'\n\u003e\u003e\u003e # public/private key encryption/decryption\n\u003e\u003e\u003e from easyencrypt import newKeyPair, encrypt, decrypt\n\u003e\u003e\u003e pub, priv = newKeyPair()\n\u003e\u003e\u003e ciphertext = encrypt(message, pub)\n\u003e\u003e\u003e ciphertext\nb\"\\x01@H\\x16\\xe5\\x01\\xc0\\x02)\\x13\\x8e\\xba\\xbb{p_5t\\xf1\\x81\\x18y2\\x12=t\\xfe\\xeb(\\xcf\\xce\\xdd\\xbd'\\xb2\\xddS\\xbd\\x0e\\xc3\\xf5\\x0b-\\xd8{\\xe3W\\xd5\\xe8)_\\xa8\\xfb\\x11\\x8d\\xb2\\xb0l\\x04\\xf2\u003e\\xd9`\\x0cS\\xb9\"\n\u003e\u003e\u003e decrypt(ciphertext, priv)\nb'Hello, World!'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkhallen%2Feasyencrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkhallen%2Feasyencrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkhallen%2Feasyencrypt/lists"}