Metadata-Version: 2.4
Name: crYpt_pr
Version: 0.0.1
Summary: some methods about classical code
Author-email: meiyingm1y1 <2653708110@qq.com>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Encryption Algorithms Module

This directory contains implementations of several classic encryption algorithms. Below is a brief description of each file:

## File Descriptions

### `__init__.py`
- This file marks the current directory as a Python package.

### `caesar.py`
- Implements the Caesar Cipher encryption algorithm.
- Caesar Cipher is a simple substitution cipher that encrypts text by shifting letters in the alphabet by a fixed number of steps.
- Functions:
  Caesar_encode(plaintext: str, key: int) -> str: Encrypts the given plaintext using the specified key.
  plaintext: The input string to be encrypted.
  key: The number of positions to shift each letter.
- Caesar_decode(ciphertext: str) -> dict: Attempts to decrypt the ciphertext by trying all possible keys.
   ciphertext: The encrypted string to be decrypted.

### `Playfair.py`
- Implements the Playfair Cipher encryption algorithm.
- Playfair Cipher is an encryption method based on a letter matrix, commonly used to encrypt text.
- Functions:
   Playfair_encode(Keyword: str, Plaintext: str) -> str: Encrypts the plaintext using the Playfair cipher.
   Keyword: The encryption key used to generate the matrix.
   Plaintext: The input string to be encrypted.

### `Vigenere.py`
- Implements the Vigenère Cipher encryption algorithm.
- Vigenère Cipher is a polyalphabetic substitution cipher that uses a key to determine the shift for each letter.
- functions:
   Vigenere_encode(Plaintext: str, m: int, keyword: str) -> str: Encrypts the plaintext using the Vigenère cipher.
   Plaintext: The input string to be encrypted.
   m: The length of the keyword.
   keyword: The encryption key.
## Usage

1. Import the modules:
   ```python
   from crYpt import caesar, Playfair, Vigenere
   ```

2. Call the corresponding functions to encrypt or decrypt.

## Notes
- Ensure that the input text and key meet the requirements of each algorithm.
- For detailed usage instructions, refer to the comments in each file.
