# Crypto Middleware for DjangoRestFramework
### Installation
```bash
python3 -m pip install django_rest_crypto
```
### Usage
```python
# settings.py
MIDDLEWARES += [
'django_rest_crypto.middlewares.EncryptDataMiddleware',
]
ENCRYPT_KEY = b'1234567890ABCDE' # 16, 24 or 32 bytes, required
ENCRYPT_MODE = 'CBC' # default
ENCRYPT_IV = b'1234567890ABCDE' # optional
ENCRYPT_NONCE = b'1234567890ABCDE' # optional
```
Raw data
{
"_id": null,
"home_page": "https://github.com/suqingdong/django_rest_crypto",
"name": "django-rest-crypto",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "suqingdong",
"author_email": "suqingdong1114@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/33/0e/e24386f0a67ed22e7095215ff547c90e50ed5c6bfbbbe11ddc83b4da747c/django_rest_crypto-1.0.2.tar.gz",
"platform": null,
"description": "# Crypto Middleware for DjangoRestFramework\n\n### Installation\n```bash\npython3 -m pip install django_rest_crypto\n```\n\n\n### Usage\n```python\n# settings.py\n\nMIDDLEWARES += [\n 'django_rest_crypto.middlewares.EncryptDataMiddleware',\n]\n\n\nENCRYPT_KEY = b'1234567890ABCDE' # 16, 24 or 32 bytes, required\nENCRYPT_MODE = 'CBC' # default\n\nENCRYPT_IV = b'1234567890ABCDE' # optional\nENCRYPT_NONCE = b'1234567890ABCDE' # optional\n```\n\n\n",
"bugtrack_url": null,
"license": "BSD License",
"summary": "Crypto Middleware for DjangoRestFramework",
"version": "1.0.2",
"project_urls": {
"Documentation": "https://django_rest_crypto.readthedocs.io",
"Homepage": "https://github.com/suqingdong/django_rest_crypto",
"Tracker": "https://github.com/suqingdong/django_rest_crypto/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b13c756ea361927ce906d721efcf4f3de74e40936bbbfab7bb5df272849f7da",
"md5": "6f6fdef34a1921121722eabdec9c2b3b",
"sha256": "acc5208c8e627bf61022bb21015b40f254a43a87d2c9a54d3411a9fb8a5fedba"
},
"downloads": -1,
"filename": "django_rest_crypto-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6f6fdef34a1921121722eabdec9c2b3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3985,
"upload_time": "2024-09-09T08:54:39",
"upload_time_iso_8601": "2024-09-09T08:54:39.304539Z",
"url": "https://files.pythonhosted.org/packages/3b/13/c756ea361927ce906d721efcf4f3de74e40936bbbfab7bb5df272849f7da/django_rest_crypto-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "330ee24386f0a67ed22e7095215ff547c90e50ed5c6bfbbbe11ddc83b4da747c",
"md5": "138185ccf0d8d2929eed6b23cb89c463",
"sha256": "de48e9e9ca1dd928450ba0f87b1f0801975667af3c50b70a5aa75794311e3547"
},
"downloads": -1,
"filename": "django_rest_crypto-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "138185ccf0d8d2929eed6b23cb89c463",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3422,
"upload_time": "2024-09-09T08:54:40",
"upload_time_iso_8601": "2024-09-09T08:54:40.697193Z",
"url": "https://files.pythonhosted.org/packages/33/0e/e24386f0a67ed22e7095215ff547c90e50ed5c6bfbbbe11ddc83b4da747c/django_rest_crypto-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 08:54:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "suqingdong",
"github_project": "django_rest_crypto",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "django",
"specs": []
},
{
"name": "pycryptodomex",
"specs": []
}
],
"lcname": "django-rest-crypto"
}