Download the PHP package jmrashed/laravel-cryptographic-signatures without Composer
On this page you can find all versions of the php package jmrashed/laravel-cryptographic-signatures. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jmrashed/laravel-cryptographic-signatures
More information about jmrashed/laravel-cryptographic-signatures
Files in jmrashed/laravel-cryptographic-signatures
Package laravel-cryptographic-signatures
Short Description A Laravel package for cryptographic signature generation and verification.
License MIT
Informations about the package laravel-cryptographic-signatures
Laravel Cryptographic Signatures
A Laravel package for generating and verifying cryptographic signatures using RSA keys. This package provides easy-to-use methods for securing your data through signatures, ensuring authenticity and integrity.
Installation
You can install the package via Composer by running the following command in your Laravel project:
Publishing Configuration
Publish the package's configuration file to customize your keys:
This will create a cryptosignature.php file in the config/ directory, where you can specify the paths to your private and public keys.
Configuration
In your .env file, set the paths to your private and public keys:
How to generate RSA keys: storage/keys/private.key and storage/keys/public.key
Make sure your keys are stored securely in the specified paths.
How to publish config and keys
Usage
Once the package is installed and configured, you can easily generate and verify cryptographic signatures.
Generating a Signature
Use the CryptoSignature facade to generate a signature for your data.
Verifying a Signature
You can also verify a signature to ensure the integrity and authenticity of the data.
Features
- Generate cryptographic signatures: Safely sign your data with a private key.
- Verify signatures: Ensure the authenticity and integrity of data with a public key.
- Flexible configuration: Easily set custom key paths through Laravel’s config system.
Example
Here’s a complete example that demonstrates generating and verifying a signature:
Testing
To run tests for the package, use the following command:
Make sure your keys are properly configured in the .env file before running the tests.
License
The package is open-sourced software licensed under the MIT license.
Contributing
Contributions are welcome! Please feel free to fork the repository, submit issues, and send pull requests.
- Fork the repo and clone it to your local machine
- Create a new branch for your changes
- Write tests for new features or bug fixes
- Submit a pull request with a description of your changes
Support
If you encounter any issues or have questions, feel free to open an issue in the GitHub repository.
Acknowledgments
- Thanks to Laravel for its amazing framework that makes building packages so easy!
- OpenSSL for providing secure cryptographic tools that power this package.