ctx-defense-1.0.0.dev20161106
توضیحات
The CTX defense library.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | ctx-defense-1.0.0.dev20161106 |
| نام | ctx-defense |
| نسخه کتابخانه | 1.0.0.dev20161106 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dimitris Karakostas |
| ایمیل نویسنده | dimit.karakostas@gmail.com |
| آدرس صفحه اصلی | https://github.com/dimkarakostas/ctx |
| آدرس اینترنتی | https://pypi.org/project/ctx-defense/ |
| مجوز | MIT |
ctx
==============
The CTX defense library.
Installation
============
- Install the latest stable version using ``pip``:
```sh
pip install ctx-defense
```
Basic Usage
===========
- Import the CTX class from ctx and initialize the ctx object:
```python
from ctx_defense import CTX
ctx_object = CTX()
```
- Protect a secret from an origin with a specific alphabet:
```python
protected_secret = ctx_object.protect(secret, origin, alphabet)
```
- Retrieve the permutations for all origins:
```python
permutations = ctx_object.get_permutations()
```
- For more information on the CTX library and the classes it implements visit the defense's [website](https://github.com/dimkarakostas/ctx).
Example
=======
```python
from ctx_defense import CTX
secret = 'A secret string'
origin = 'user1'
alphabet = 'ASCII'
ctx_object = CTX()
protected_secret = ctx_object.protect(secret, origin, alphabet)
permutations = ctx_object.get_permutations()
```
نحوه نصب
نصب پکیج whl ctx-defense-1.0.0.dev20161106:
pip install ctx-defense-1.0.0.dev20161106.whl
نصب پکیج tar.gz ctx-defense-1.0.0.dev20161106:
pip install ctx-defense-1.0.0.dev20161106.tar.gz