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

If you're not sure about the file name format, learn more about wheel file names.

ctx_defense-1.0.0.dev20161106-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ctx_defense-1.0.0.dev20161106-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ctx_defense-1.0.0.dev20161106-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fad79ac4970b6fb51693714f2601ca6ce7209a6abb91b7f26301689482027f04
MD5 c32c157a9a79cfabd15374e2438d69b8
BLAKE2b-256 44210d5b45680bbbf3a1e4b1a6306382416cc5de1bd7cde825646d8389285574

See more details on using hashes here.

Supported by

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