Skip to main content

A collection of algorithms

Project description

Paicrypto - Cryptographic Library

Paicrypto is a Python library that provides various encryption and decryption methods using different cryptographic algorithms. This library aims to facilitate secure communication and data protection in Python applications.

Installation

To install paicrypto, you can use pip:

pip install paicrypto

Usage

Once installed, you can import the paicrypto class from the library and utilize its methods for encryption, decryption, and hashing.

from paicrypto import paicrypto

# Create an instance of paicrypto
crypto = paicrypto()

# Encrypt data using DES3 algorithm
cipher_text = crypto.desEncrypt3("Hello, World!", "secretkey")

# Decrypt data using DES3 algorithm
plain_text = crypto.desDecrypt3(cipher_text, "secretkey")

print("Encrypted:", cipher_text)
print("Decrypted:", plain_text)

Available Methods

The paicrypto class provides the following methods:

  • desEncrypt3(data, key)
  • desDecrypt3(data, key)
  • desEncrypt(data, key)
  • desDecrypt(data, key)
  • desPaddedEncrypt(data, key)
  • desPaddedDecrypt(data, key)
  • aesEncrypt(data, key)
  • aesDecrypt(data, key)
  • aesPaddedEncrypt(data, key)
  • aesPaddedDecrypt(data, key)
  • rsaEncrypt(data, key)
  • rsaDecrypt(data, key)
  • rsaKeyGen()
  • elgamalKeyGen()
  • elgamalEncrypt(data, key)
  • elgamalDecrypt(data, key)
  • deffieHellmanKeyGen()
  • deffieHellmanEncrypt(data, key)
  • deffieHellmanDecrypt(data, key)
  • socketDeffieHellmanKeyGen()
  • socketDeffieHellmanEncryptServer(data, key, port)
  • socketDeffieHellmanDecryptClient(data, key, port)
  • socketDeffieHellmanDecryptServer(data, key, port)
  • socketDeffieHellmanEncryptClient(data, key, port)
  • sha256(data)
  • sha512(data)
  • sha1(data)
  • md5(data)
  • sha224(data)
  • caesar_encrypt(text, shift)
  • caesar_decrypt(text, shift)
  • vigenere_encrypt(plaintext, key)
  • vigenere_decrypt(ciphertext, key)
  • railfence_encrypt(lst, numrails)
  • Railencode(text, n)
  • raildecode(text, n)
  • columnar_transposition_encrypt(text, key)
  • columnar_transposition_decrypt(text, key)
  • playfair_encrypt(plaintext, key)
  • playfair_decrypt(ciphertext, key)
  • rc4_encrypt(plaintext, key)
  • rc4_decrypt(ciphertext, key)

For more detailed information on each method, refer to the help() function provided in the paicrypto class.

Contribution

Contributions to CryptoLib are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request on GitHub.

Build Commands

-To build the wheel file, run the following command:

python setup.py sdist bdist_wheel

-To upload the wheel file to PyPi, run the following command:


twine upload dist/*

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

paicrypto-6.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

paicrypto-6.0-py2-none-any.whl (7.3 kB view details)

Uploaded Python 2

File details

Details for the file paicrypto-6.0.tar.gz.

File metadata

  • Download URL: paicrypto-6.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.21.0 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for paicrypto-6.0.tar.gz
Algorithm Hash digest
SHA256 512abea3af0f81e0b42b500c5313e9dffc511d0d1bb758d23a241200f2db2611
MD5 c9ee7a2b479f45a7f75e587146eaae32
BLAKE2b-256 3e32c09bf08d13a7332f933dc4f25d7e09d669b09293fb8af4ff943cbd9f965f

See more details on using hashes here.

File details

Details for the file paicrypto-6.0-py2-none-any.whl.

File metadata

  • Download URL: paicrypto-6.0-py2-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.21.0 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for paicrypto-6.0-py2-none-any.whl
Algorithm Hash digest
SHA256 14dcfb070b65fb5d2bdf4d666f827a13aafc97cd68a67d19b88e47cdb5a6c803
MD5 088f29dd692c53a6389b746bd42c4890
BLAKE2b-256 854a4688d8d972fc2858f0a4edfa475756b3b0a434a963fbdd3e6bff9ca41488

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