moccalotto/crypto 问题修复 & 功能扩展

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

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

moccalotto/crypto

最新稳定版本:0.8.1

Composer 安装命令:

composer require moccalotto/crypto

包简介

Tiny encryption lib for PHP

README 文档

README

Build Status

Encrypt data using aes-128-cbc. Message authentication is done via sha-256 HMAC

Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on moccalotto/crypto to your project's composer.json file like so:

{
    "require": {
        "moccalotto/crypto": "~0.8"
    }
}

Alternatively simply call composer require moccalotto/crypto

Demo

<?php

use Moccalotto\Crypto\Crypto;

require 'vendor/autoload.php';

$key = 'some secret key';

$plaintext = 'This is the secret plaintext to be encrypted';

$encrypted = Crypto::with($key)->encrypt($plaintext);

echo Crypto::with($key)->decrypt($encrypted) . PHP_EOL;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-09