Download the PHP package botdigit/completeopenpgp without Composer
On this page you can find all versions of the php package botdigit/completeopenpgp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download botdigit/completeopenpgp
More information about botdigit/completeopenpgp
Files in botdigit/completeopenpgp
Package completeopenpgp
Short Description A complete OpenPGP package for Laravel that supports the ElGamal cryptosystem (with elliptic curve support)
License MIT
Informations about the package completeopenpgp
Sure! Here’s a comprehensive README.md for your CompleteOpenPGP package, which can be used by users to understand how to install and use the package in a Laravel application. This README includes installation instructions, configuration details, and usage examples.
CompleteOpenPGP Laravel Package
CompleteOpenPGP is a complete OpenPGP package for Laravel, supporting encryption, decryption, signing, and verification using the OpenPGP standard. It supports the ElGamal cryptosystem (with elliptic curve support) and integrates easily into Laravel applications.
Features
- Full OpenPGP support for encryption, decryption, signing, and signature verification.
- ElGamal cryptosystem with elliptic curve support.
- Laravel-friendly integration with easy-to-use APIs.
- Supports common elliptic curve algorithms such as NIST, brainpool, and ed25519.
Installation
To install the package, you can use Composer.
Step 1: Install the Package via Composer
Run the following command in your terminal to install CompleteOpenPGP:
Step 2: (Optional) Publish the Configuration File
You can publish the configuration file to customize the package according to your needs:
This will create a configuration file at config/completeopenpgp.php
.
Configuration
Once installed, you can configure the CompleteOpenPGP package by editing the published configuration file config/completeopenpgp.php
.
Example configuration:
Make sure to set the environment variables (PGP_SIGNING_KEY
, PGP_ENCRYPTION_KEY
, PGP_PASSPHRASE
) in your .env
file.
Usage
Encrypting a Message
To encrypt a message using a public key:
Decrypting a Message
To decrypt a message using a private key and passphrase:
Signing a Message
To sign a message with your private key:
Verifying a Signed Message
To verify a signed message using the public key:
Command-Line Usage
You can also use artisan commands to perform encryption, decryption, signing, and verification.
Example Command to Encrypt a File:
Example Command to Decrypt a File:
Testing
To run tests for the CompleteOpenPGP package, you can use Laravel’s built-in test suite:
Unit Tests
Unit tests are provided in the tests
directory. You can extend the tests based on your requirements.
Security
- Keys: Make sure your private keys are kept secure. The package uses
gnupg
orphpseclib
to handle key management, but you should always ensure that private keys are stored in a safe, non-public location. - Passphrase: Use a strong passphrase for your private keys to protect them from unauthorized access.
Contributing
If you'd like to contribute to CompleteOpenPGP, feel free to fork the repository, make your changes, and submit a pull request.
Steps to Contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature-name
) - Make your changes
- Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/your-feature-name
) - Submit a pull request
License
This package is open-source and available under the MIT License.
Notes:
- Make sure to replace paths and environment variables with your own values.
- Include clear documentation for end users, like example inputs/outputs, where to get keys, and how to configure things in Laravel.
Let me know if you need additional changes or improvements!