mirror of
https://github.com/kvazar-network/crypto-php.git
synced 2025-01-31 09:14:42 +00:00
add Kevacoin utils
This commit is contained in:
parent
6ec264df7d
commit
0e33447c91
26
src/Kevacoin.php
Normal file
26
src/Kevacoin.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Kvazar\Crypto;
|
||||
|
||||
class Kevacoin
|
||||
{
|
||||
function decode(string $value)
|
||||
{
|
||||
if (is_numeric($string) && $string < 0xFFFFFFFF)
|
||||
{
|
||||
return mb_chr(
|
||||
$string,
|
||||
'ASCII'
|
||||
);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return hex2bin(
|
||||
$string
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user