Skip to main content

Tiny Cisco Type 7 (c7) encoder/decoder with a CLI.

Project description

c7d

Tiny Cisco Type 7 (c7) encoder/decoder with a CLI.

⚠️ Security warning: Cisco Type 7 is a simple XOR obfuscation, not cryptography.Do not rely on it to protect secrets.

Installation

pip install c7d

Usage

CLI

# Decrypt a Type 7 string
c7d decrypt 060506324F41
# => cisco

# Encrypt plaintext (seed defaults to 00)
c7d encrypt cisco --seed 6
# => 060506324F41

Run without installation

uvx c7d --help

Library

from c7d import encrypt, decrypt

cipher = encrypt("cisco", seed=6)  # '060506324F41'
plain  = decrypt(cipher)            # 'cisco'

API

  • c7d.encrypt(plain: str, seed: int = 0) -> str
  • c7d.decrypt(x: str) -> str

Rationale

This implements the well-known Cisco Type 7 algorithm using the 53-character key string dsfd;kfoA,.iyewrkldJKDHSUBsgvca69834ncxv9873254k;fg87. The algorithm XORs each plaintext byte with a position-dependent character from this key, starting at an index based on a two-digit decimal seed (00–99). The output is the seed followed by uppercase hex bytes.

License

MIT

Project details


Download files

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

Source Distribution

c7d-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

c7d-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file c7d-0.1.0.tar.gz.

File metadata

  • Download URL: c7d-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for c7d-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73de1896497371270ae6d61b37bbf715308d44e14d8c1007075a5e2aca861c21
MD5 87171647be310238247cca98448d5c7f
BLAKE2b-256 874907c1b53bb87818d1b739519226597b87fa4b513e332a7a792ed9d9785d3f

See more details on using hashes here.

File details

Details for the file c7d-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: c7d-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for c7d-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9b36095656511777e9ca572e4a9f90108fb6f3f132b772b66c8b9c0b4c447ba7
MD5 f6a94dd53e29715a1eb42ca18af89c61
BLAKE2b-256 40f7a14c6f2136446795bc1bc700110740d47462d80e8da47e4f59b9623227ee

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