Skip to main content
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()
```


Metadata

Release files for ctx-defense 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ctx-defense 1.0.0
File Interpreter ABI Platform Actions
ctx_defense-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for ctx_defense-1.0.0-py2.py3-none-any.whl

Release files / ctx_defense-1.0.0-py2.py3-none-any.whl

Download URL ctx_defense-1.0.0-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3f3f28d4ddee75fa8553a25104cf0af35927f2328ab9bce063131eb33e5921b5
BLAKE2b-256 checksum
How to use checksums
989e72eef70a75b6490cb126d9526bcd1c45d500b58716a6e730e20f250724f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ctx-defense 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page