vsn/ssf
Composer 安装命令:
composer create-project vsn/ssf
包简介
VSN Secure Signture Format for PHP 5.6
README 文档
README
Copyright © Tyler R. Drury 28-04-2022, All Rights Reserved
Proudly Canadian, made in Ontario
vsn\ssf-cli.phar is a PHP 5.6 archive which contains Object oriented APIs for PHP resource types and global functions such as:
- encoding SSF 32 and 64 Byte signatures
- deconding SSF 32 and 64 Byte signatures
- verifying SSF 32 and 64 Byte signatures
License
ssf-cli.phar is released under the Apache 2.0 License typical of all VSN products.
See LICENSE file for details.
Installation
using composer
The offical PHP CLI package is available via Composer here
or by running the following in the console (assuming both PHP and Composer have been installed locally)
>composer require vsn/ssf
or by adding vsn/ssf to your own project composer.json require section
then running
>composer update
using github
Access this URL in browser to clone the repo directly
https://github.com/vigilance91/ssf-cli-php56.git
or install using GithubCLI
>gh repo clone vigilance91/ssf-cli-php56
Or simply
- download vsn\ssf-cli-php56™ PHAR from the offical website
- download the latest stable version via the offcial FTPS server
- download the official compressed package (.gz) from IPFS
Use
After installation, the PHAR may be executed from anywhere on a machine
>cd C:/some/directory
>%php5% C:/phars/ssf-cli/run.php --d=3 --v --A
or, if the archive is installed in a main project's sub-directory:
>cd C:/some/directory
>%php5% build/run.php --d=3 --v --A
Or, if the PHP interpreter and the local directory containg all downloaded PHARS have been added to the default system PATH variable, the leading call to the php interpreter can be omitted as follows
>php %PHAR_DIR%/ssf-cli/run.php --d=3 --v --A
- DEBUG installs are for the most recent developer builds (alphas) only, as such, all distributable PHARs lack any debug functionality and enabling quiet mode hides the header, footer and menu displays (if --A is provides as well)
- All DEBUG installs are dependent upon the chrono module for low-level, high accuracy code execution profiling
- Note that if debugging a script executing on a server, use of xdebug (for live server debugging) requires PHP 7.1+ as well as a manually compiled PHP interpreter, with the xdebug Zend extension installed and a compatible IDE (with appropriate extensions)
Ensure all additional desired/required modules have been installed.
Output an unsigned packed SSF32 to the console, outputting as hex
>php build/run.php --M=encode --F=str
--source="hello world"
--hex
Encode an unsigned packed SSF32, outputting to the console as base64
>php build/run.php --M=encode --F=str
--source="hello world"
--base64
Encode an signed packed SSF32, outputting to the console as hex
>php build/run.php --M=encode --F=str
--source="hello world"
--privateKey=pathToPrivateKey.key
--password=yourPasswordHere
--hex
Write SSF encoded string to file
>php build/run.php --M=encode --F=stf
--source="hello world"
--O="_output/tmpPackedUnsinged.ssf32"
--hex --v --d=3
Optionally, instead of using the -F stf, --O, --v and --d options can be omitted and the shell's pipe operator can be used to write the output (assuming there is no other output, errors, exceptions, etc, than what is output at exection termination), option -F str can be used similar to bellow:
>php build/run.php --M=encode --F=str
--source="hello world"
--hex > _output/tmpPackedUnsinged.hex.ssf32
Verify --source as a base64 encoded Unsigned SSF.
>php build/run.php -M verify --F=f
--source="hello world"
--ssf="I1NTRg0KGgqcgTTO8t+o6YGHEdqa/hDg2kjcp1jKhm66jUffJYR89Ec9fYM0P7fgOPQvfccOAYxScHP08mG8NdfcXDfIlUDBAAABQLlNJ7mTTT4IpS5S19p9q/rEhO/jelOA7pCI96zi783pSzJ0jfVOQaCUZUsMyoj3dgqKzOKwWPUatmlWE/W4N2W3w6rTJQPQTISFOECbnzUuYaWZVeVOu3g6dEdksH5JL3eX97R/uaC3lW/FFykYHY01oxf6hB/qXE1F3c6irjOiaQITZ+D6S0v7qgyvAxFdtmgRCLSVAMgI74rXrpoWAT7QnM6MSk740c/fG23iDvXKK5I7aqfVl1iLUBo4Jd8B+rhTSeOiHYdZZNbiwfdQ22ZyHu+JbmNtpRMQ7TesjOZW+SPMI009rK1KPOFW3Uqp4KJMlszQjn3tkWRlZhjnIvhpmzGIP2/JMi8weaSEd5yTIkRAIVUTCnJp1yboZSUW85dlVmXIfhMYm4wJyF7rDSHSobaG5agPMFOQETf0UUt4"
--base64
Note: If the option argument does not contain whitespace quotes can be omitted. If the argument is a file path or URL, it is recommended to urlencode the value if the value contains whitespace or other characters needing escaped while also omitting the quottion marks.
>php build/run.php -M verify --F=f
--v --d=3 --base64
--privateKey="C:/path/to/rsaPrivateKey.key"
--password="replaceWithYourPrivteKeyPassword"
--source="_output/helloWorld.txt"
--ssf="I1NTRg0KGgqcgTTO8t+o6YGHEdqa/hDg2kjcp1jKhm66jUffJYR89Ec9fYM0P7fgOPQvfccOAYxScHP08mG8NdfcXDfIlUDBAAABQLlNJ7mTTT4IpS5S19p9q/rEhO/jelOA7pCI96zi783pSzJ0jfVOQaCUZUsMyoj3dgqKzOKwWPUatmlWE/W4N2W3w6rTJQPQTISFOECbnzUuYaWZVeVOu3g6dEdksH5JL3eX97R/uaC3lW/FFykYHY01oxf6hB/qXE1F3c6irjOiaQITZ+D6S0v7qgyvAxFdtmgRCLSVAMgI74rXrpoWAT7QnM6MSk740c/fG23iDvXKK5I7aqfVl1iLUBo4Jd8B+rhTSeOiHYdZZNbiwfdQ22ZyHu+JbmNtpRMQ7TesjOZW+SPMI009rK1KPOFW3Uqp4KJMlszQjn3tkWRlZhjnIvhpmzGIP2/JMi8weaSEd5yTIkRAIVUTCnJp1yboZSUW85dlVmXIfhMYm4wJyF7rDSHSobaG5agPMFOQETf0UUt4"
Note:Quotation marks around string arguments are optional, unless the value contains whitespace or other escape characters.
>php build/run.php -M verify --F=str
--v --d=3 --base64
--privateKey=C%3A%2Fpath%2Fto%2FrsaPrivateKey.key
--password=replaceWithYourPrivteKeyPassword
--source=.%2F_output%2FhelloWorld.txt
--ssf=I1NTRg0KGgpskEqXGkFC0z9JaYtHC8MEOzfdU7tJvJMCSbkRuprJ4Uc9fYM0P7fgOPQvfccOAYxScHP08mG8NdfcXDfIlUDBAAAAILlNJ7mTTT4IpS5S19p9q/rEhO/jelOA7pCI96zi783p
Links
The official, most recent and stable version of the VS CLI PHAR libraries for development use are hosted here:
-
PHAR unminifed version 0.1.1 (SSF32: )
-
PHAR minifed version 0.1.1 (SSF32: )
-
GZ compressed version 0.1.1 (SSF32: )
-
BZ compressed version 0.1.1 (SSF32: )
-
ZIP compressed version 0.1.1 (SSF32: )
Additional Links
- ssf-cli-php73 - License, Authors & contributors.
- ssf-cli-php81 - License, Authors & contributors.
vsn/ssf 适用场景与选型建议
vsn/ssf 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 01 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「signature」 「secure」 「openssl」 「sha256」 「sha512」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 vsn/ssf 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vsn/ssf 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vsn/ssf 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure Trading driver for the Omnipay PHP payment processing library
A PHP library to encrypt/decrypt secrets using OpenSSL.
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Platine Security provides a complete security system with encryption, hash support.
接口签名验证
A library for reading KeePass 2.x databases
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2023-01-29