Skip to main content

The CTX defense library.

Project description

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()
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ctx_defense-1.0.0.dev20161104-py2.py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page