ranabd36/openssl-encryption
Composer 安装命令:
composer require ranabd36/openssl-encryption
包简介
Secure Laravel OpenSSL Public Key/Private Key Encryption Library
README 文档
README
Secure Laravel OpenSSL Public Key/Private Key Encryption Library.
Introduction
OpenSSL Encryption is laravel public/private key pair encryption package. Which allow you to generate public/private key and encrypt and decrypt data with that public/private key.
You want to send/receive secure message to your friends. Then you have to generate public/private key and send the public key to your friends. Now one of your friends encrypt the message with your given public key and send it to you. You receive the message and decrypt the message with your private key.
If any attacker found the message but the attacker could not decrypt it without your private key. So don't share your private key with anyone.
Install (Laravel)
Install via composer
composer require ranabd36/openssl-encryption:1.0.0
The package is auto-discovered and registered by default, but if you want to register it yourself:
Add service provider to config/app.php in providers section.
OpenSSLEncryption\Providers\OpenSSLEncryptionServiceProvider::class,
Add alias to config/app.php in alias section.
OpenSSLEncryption\OpenSSL::class,
To publish the config, run the vendor publish command:
php artisan vendor:publish --provider="OpenSSLEncryption\Providers\OpenSSLEncryptionServiceProvider"
Usage
To generate public/private key run the following artisan command :
php artisan openssl:key-generate
After generating the key you need to set your public/private key path to config/openss.php and passphrase (if you set passphrase while generating key).
Encrypt Data:
OpenSSL:encrypt('This text need to encrypt'); //This will return an encrypted data
Decrypt Data:
OpenSSL:decrypt('encrypted data'); //This will return plain text/data: This text need to encrypt
Upcoming Feature
Encrypt and decrypt with multiple public/private key.
License
OpenSSL Encryption is open-sourced software licensed under the MIT license
ranabd36/openssl-encryption 适用场景与选型建议
ranabd36/openssl-encryption 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 64 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 08 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「encryption」 「laravel」 「encrypt」 「decrypt」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ranabd36/openssl-encryption 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ranabd36/openssl-encryption 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ranabd36/openssl-encryption 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple PHP class to encrypt a string and decrypt an encrypted string
Encrypted symfony entity's by verified and standardized libraries
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
Encryption with AES-256 and HMAC-SHA256
Allows installation of Laravel where the PHP Mcrypt extension is not available. Provides encryption using OpenSSL, or by disabling encryption entierly.
High-level cryptographic primitives and security utilities for Maatify systems including password hashing, reversible encryption, HKDF key derivation, and key rotation.
统计信息
- 总下载量: 64
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-08