{"id":16452603,"url":"https://github.com/agent-hellboy/flask-hedcrypt","last_synced_at":"2026-05-20T14:06:35.245Z","repository":{"id":52303530,"uuid":"260939771","full_name":"Agent-Hellboy/flask-hedcrypt","owner":"Agent-Hellboy","description":"  A flask extension which provide interface( set of APIs) having implemenation of some of the use cases of cryptography.  ","archived":false,"fork":false,"pushed_at":"2021-06-12T10:33:20.000Z","size":452,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T16:49:21.491Z","etag":null,"topics":["cryptography","flask","flask-extensions","flask-sqlalchemy","pycrypto","pypdf2","python"],"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/Agent-Hellboy.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":"2020-05-03T14:18:01.000Z","updated_at":"2021-06-12T10:33:22.000Z","dependencies_parsed_at":"2022-09-06T07:55:10.849Z","dependency_job_id":null,"html_url":"https://github.com/Agent-Hellboy/flask-hedcrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Agent-Hellboy/flask-hedcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-hedcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-hedcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-hedcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-hedcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agent-Hellboy","download_url":"https://codeload.github.com/Agent-Hellboy/flask-hedcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fflask-hedcrypt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268327821,"owners_count":24232748,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cryptography","flask","flask-extensions","flask-sqlalchemy","pycrypto","pypdf2","python"],"created_at":"2024-10-11T10:13:18.062Z","updated_at":"2026-05-20T14:06:35.180Z","avatar_url":"https://github.com/Agent-Hellboy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-hedcrypt\n     \n      \n  \tA flask extension which provide interface( set of APIs) having implemenation of some of the use cases of cryptography.  \n      \n## General info\n\n* If None of the use cases are found in future then the flask name may be removed \n  from repo.As currently their is only one use case related to flask i.e. decorating the class \n  inherited from db.Model class of flask-sqlalchmey.\n\n* I want to decorate the class inherited from db.Model so that instead of \n   calculating the hash seperately using an API and then storing it into \n   the database. User should have an option to decorate the class and wrapper code \n   will calculate the derived key from ssid and username and store it as a new field name derived key.   \n      \n**features**\n-----------\n\n*  Key Derivation in accordance with PKCS7.\n*  The derived key is used as a password. \n*  Derived Key is always inserted in every file you upload onto the server into the metadata of file(currently only pdf encryption is tested manualy)\n*  No one is ever able to see the files (e.g documents) except you as the file is stored as an encrypted file onto the server.\n*  You can use the APIs like key_derive and key_verify for password. But you also had an option to decerote the Model class in future for that you  had to provide ssid and username into the model so that a key is derived from it (use this method if you want to use more funtionality of the extension).\n\n\n**Prerequisites**\n------------------\n\nknow how to use flask extensions\n\u003cbr\u003e\npip3 install -r requirements.txt\n\n\n\n**using** \n--------  \n\n Currently under developement \u003cbr\u003e\n Welcoming you all to contribute in any possible way.\n Please have a look at the todo.  \n\n \n\t    git clone https://github.com/princekrroshan01/flask-hedcrypt/\n\t    cd flask-hedcrypt\n\t    virtualenv venv\n\t    source venv/bin/activate\n\t    pip install -r requirements.txt\n\n \u003cbr\u003e\n For now\n\n Key Derivation and Verification APIs\n ```\n\tfrom flask import Flask\n\tfrom flask_crypto.flask_crypto import Crypto\n\t\n\tapp = Flask(__name__)\n\tcrpt = Crypto(app)\n\n\tkey = crpt.key_derive(b\"data\")  # api to calculate key using PKCS7\n\n\tcrpt.key_verify(b\"data\", key)  # api to verify the key\n \n ```\n File Encryption and Decryption APIs (currently only text,pdf ,...) \n\n ```\n\tfrom flask_crypto.file_encryt_decrypt import FileEncryptDecrypt\n\n\tfile_ecd = FileEncryptDecrypt(key)\n\n\tfile_edc.encrypt_file(file / path / to / encrypt)  # api to encrypt file\n\n\tfile_edc.encrypt_file(file / path / to / decrypt)  # api to decrypt file\n ```\n \n    \n**TODO**\n---------\n\n- [ ] write configuration parameters for the extension.\n- [x] file encryption and decryption support using symmetric key encryption.\n- [ ] API for PGP(preety good privacy).\n- [ ] coming up with the use case for API support to use asymmetric key encryption.\n- [ ] write UnitTest for file encryption and decryptio.\n- [ ] Writing deceroter class for flask-sqlalchemy model class.\n- [x] Store Derived Key in metadata of file (For now PDF files). \n- [ ] Use pytest to write tests for the package.\n\n\n**Contributing**\n----------------\nWelcome You all to improve this extension. \n\u003cbr\u003e\nPlease suggest some use cases.\n\u003cbr\u003e\nOpen to accept any harse reality about this extension.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fflask-hedcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagent-hellboy%2Fflask-hedcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fflask-hedcrypt/lists"}