nullpobug/django-signing
最新稳定版本:v0.1.1
Composer 安装命令:
composer require nullpobug/django-signing
包简介
Django compatible signing library
README 文档
README
Django compatible signing library for PHP
Installation
composer require nullpobug/django-signing
Usage
use Nullpobug\Django\Signing\Api; $secret_key = 'your-secret-key'; $salt = 'your-salt'; $compress = true; // Optional, default is false $add_timestamp = true; // Optional, default is false // Signing a value $signed_value = Api::dumps([ 'key' => 'value', 'foo' => 'bar', ], $secret_key, $salt, $compress, $add_timestamp); echo "Signed Value: $signed_value\n"; // Signed Value: .eJyrVspOrVSyUipLzClNVdJRSsvPB_KSEouUagF46QiI:1uJbaB:IYz9-JnIyn7NAJJSIHe8eZ0vC3hj-3a_gFmCbpCrugU // Unsigned value $unsigned_value = Api::loads($signed_value, $secret_key, $salt); echo print_r($unsigned_value); // Array // ( // [key] => value // [foo] => bar // )
Signed value is compatible with Django's signing library, allowing you to share signed data between PHP and Django applications.
Website
This project is hosted on GitHub.
License
This project is licensed under the MIT License - see the LICENSE file for details.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-26