typomedia / fciv
文件校验完整性验证器
6.3.0
2023-09-11 07:57 UTC
Requires
- php: >=7.4
- symfony/finder: ^6.3
- symfony/property-access: ^6.3
- symfony/serializer: ^6.3
Requires (Dev)
- infection/infection: ^0.26.16
- phpmd/phpmd: ^2.13
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.7
README
FCIV 兼容的用于哈希和验证文件的库。
单元测试代码覆盖率 100%!
兼容性
- Windows
- POSIX(Linux、macOS、BSD、Solaris 等)
该库完全兼容 fciv.exe
v2.05。
要求
>= PHP 7.4
依赖
无
安装
composer require typomedia/fciv
使用
验证器
use Typomedia\Fciv\Verifier\Verifier; $verifier = new Verifier(); // Options: string $algo = 'md5|sha1|both' $result = $verifier->verify(file_get_contents('fciv.xml')); // Options: string $data, $exclude = [], $path = null
哈希器
use Typomedia\Fciv\Hasher\Hasher; $hasher = new Hasher(); // Options: string $algo = 'md5|sha1|both', array $types = [] $hasher->setEntries('src'); // Options: string $path, array $exclude = [] $result = $hasher->getResult();