Files
annnj-company 130c1026c4 first commit
2026-04-17 18:29:53 +08:00

24 lines
729 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
require_once '../vendor/autoload.php';
use Rtgm\util\FormatSign;
$goodSign = 'MEUCIQDWveKrtx6VrosnYQHNBnRjolrlmi/mHwMWKU4bDxakQwIgfSX20s+Ci1SvFQBgx+kRMU3Z1xbHtT0kpZfAXVH8poc=';
$badSign = 'MEYCIQDWveKrtx6VrosnYQHNBnRjolrlmi/mHwMWKU4bDxakQwIhAH0l9tLPgotUrxUAYMfpETFN2dcWx7U9JKWXwF1R/KaH';
$fs = new FormatSign();
$newSign = $fs->run($badSign);
echo $newSign."\n";
if ($newSign == $goodSign) {
echo "OK";
} else {
echo "Bad";
}
echo "\n=========\n";
//good 补0
$goodSign2 = "MEMCHx7T5iZF+kfk0mNDxVOX2ZOytWjcFBDCRMyUZsvdk\/8CICOZz0A91TlSbZWAhs8J24nWT35l1Su8zegr+vomI9P+";
echo (bin2hex(base64_decode($goodSign2)));
echo "\n";
$newSign2 = $fs->format_cmbc($goodSign2);
echo (bin2hex(base64_decode($newSign2)));