djm56/php-string-encryption 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

djm56/php-string-encryption

最新稳定版本:v1.0.1

Composer 安装命令:

composer require djm56/php-string-encryption

包简介

Encrypt and Decrypt a String

README 文档

README

Class to encrypt and decrypt a string using openssl and open64.

I have used this in the past to encrypt/decrypt data at rest inside cookies that get used server side, or to encrypt/decrypt data at rest inside database.

This repo is still in development

Installation

This project is using composer.

$ composer require djm56/php-string-encrytion

Usage

Define constants the encrytion_key please change to something unique, the encrytion_type can stay the same.

define('ENCRYPTION_KEY', 'abcdefghij1234');
define('ENCRYPTION_TYPE', 'AES-128-CBC');

Choosing the correct Encrytption type or cipher use the available php function to list them from instruction on this page

https://www.php.net/manual/en/function.openssl-get-cipher-methods.php

How to encrypt and decrypt:

use StringEncryption\Encryption;

$encryptedtext = Encryption::encrypt('test string');
$decryptedtext = Encryption::decrypt('encrypted string');

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固