X7ROOT File Manager
Current Path:
/home/notabjze/just4dastreets.com/libraries/vendor/fgrosse/phpasn1/lib/ASN1
home
/
notabjze
/
just4dastreets.com
/
libraries
/
vendor
/
fgrosse
/
phpasn1
/
lib
/
ASN1
/
ðŸ“
..
📄
ASNObject.php
(12.84 KB)
📄
AbstractString.php
(3.32 KB)
📄
AbstractTime.php
(2.27 KB)
📄
Base128.php
(1.45 KB)
ðŸ“
Composite
📄
Construct.php
(4.31 KB)
ðŸ“
Exception
📄
ExplicitlyTaggedObject.php
(4.21 KB)
📄
Identifier.php
(10.57 KB)
📄
OID.php
(8.11 KB)
📄
Parsable.php
(1017 B)
📄
TemplateParser.php
(1.87 KB)
ðŸ“
Universal
📄
UnknownConstructedObject.php
(1.39 KB)
📄
UnknownObject.php
(1.27 KB)
Editing: Base128.php
<?php namespace FG\ASN1; use FG\Utility\BigInteger; use InvalidArgumentException; /** * A base-128 decoder. */ class Base128 { /** * @param int $value * * @return string */ public static function encode($value) { $value = BigInteger::create($value); $octets = chr($value->modulus(0x80)->toInteger()); $value = $value->shiftRight(7); while ($value->compare(0) > 0) { $octets .= chr(0x80 | $value->modulus(0x80)->toInteger()); $value = $value->shiftRight(7); } return strrev($octets); } /** * @param string $octets * * @throws InvalidArgumentException if the given octets represent a malformed base-128 value or the decoded value would exceed the the maximum integer length * * @return int */ public static function decode($octets) { $bitsPerOctet = 7; $value = BigInteger::create(0); $i = 0; while (true) { if (!isset($octets[$i])) { throw new InvalidArgumentException(sprintf('Malformed base-128 encoded value (0x%s).', strtoupper(bin2hex($octets)) ?: '0')); } $octet = ord($octets[$i++]); $l1 = $value->shiftLeft($bitsPerOctet); $r1 = $octet & 0x7f; $value = $l1->add($r1); if (0 === ($octet & 0x80)) { break; } } return (string)$value; } }
Upload File
Create Folder