Skip to main content

A module to encode and decode your text with a key

Project description

Cryptrooper

A module that can endode and decode your text with your given key.

LICENSE Tests
Builds Maintainer

Features

  • No additinal installation required.
  • Can work on any system with python >= 3.8
  • Can encode and decode text of any language.
  • Can encode and decode emoticons and symbols also.

Installation

Install cryptrooper with git-clone

  git clone https://github.com/sprin-g-reen/cryptrooper
  cd cryptrooper

Documentation

Install the cryptrooper in your working directory. Crypto is a class in the __init__.py file at the directory cryptrooper.

Parameters:

  • text
    • The text you want to encode or decode.
  • key
    • The key to encode or decode the text with.

Functions:

  • encode

    • The function that encodes your text with your key.
    • returns a DICT like the below one:
      {  
          "key": "Your Key",
          "encoded": "The encoded text",
          "decoded": "The decoded text",
          "result": "The encoded text",
          "error": None
      }
      
      • The error is None if no error, else it contains the class of raised error.
  • decode

    • The function that decoded your encoded text with your key.
    • returns a DICT like the below one:
      {  
          "key": "Your Key",
          "encoded": "The encoded text",
          "decoded": "The decoded text",
          "result": "The decoded text",
          "error": None
      }
      
      • The error is None if no error, else it contains the class of raised error.

Example of encoding:

from cryptrooper import Crypto

# `Crypto` is a class.
text = "The text you want to encode."
key = "The key."


# passing the text and key to Crypto
ins = Crypto(text, key)


# getting the result which is of type `dict`
result = ins.encode()
print(result)


# this prints:
# {
#     'key': 'The key.',
#     'encoded': '168 208 202 64 223 202 241 200 \136 222 143 224 133 240 181 214 217 64 223 212 153 185 214 200 143 207 202 167',
#     'decoded': 'The text you want to encode.',
#     'result': '168 208 202 64 223 202 241 200 136 222 143 224 133 240 181 214 217 64 223 212 153 185 214 200 143 207 202 167',
#     'error': None
# }

Example of decoding:

from cryptrooper import Crypto


# `Crypto` is a class.
text = "183 212 212 149 214 215 232 149 204 223 143 215 207 225 212 163"
key = "cloud"


# passing the text and key to Crypto
ins = Crypto(text, key)


# getting the result which is of type `dict`
result = ins.decode()
print(result)


# this prints:
# {
#     'key': 'cloud',
#     'encode': '183 212 212 149 214 215 232 149 204 223 143 215 207 225 212 163',
#     'decode': 'The sky is blue.',
#     'result': 'The sky is blue.',
#     'error': None
# }

Authors

Contributing

Contributions are always welcome! Contact @Parvat_R for Contributions.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

cryptrooper-0.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

cryptrooper-0.1-py3-none-any.whl (8.5 kB view hashes)

Uploaded 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