[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * This file is part of the PHPASN1 library. 4 * 5 * Copyright © Friedrich Große <[email protected]> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11 namespace FG\ASN1; 12 13 class UnknownConstructedObject extends Construct 14 { 15 private $identifier; 16 private $contentLength; 17 18 /** 19 * @param string $binaryData 20 * @param int $offsetIndex 21 * 22 * @throws \FG\ASN1\Exception\ParserException 23 */ 24 public function __construct($binaryData, &$offsetIndex) 25 { 26 $this->identifier = self::parseBinaryIdentifier($binaryData, $offsetIndex); 27 $this->contentLength = self::parseContentLength($binaryData, $offsetIndex); 28 29 $children = []; 30 $octetsToRead = $this->contentLength; 31 while ($octetsToRead > 0) { 32 $newChild = ASNObject::fromBinary($binaryData, $offsetIndex); 33 $octetsToRead -= $newChild->getObjectLength(); 34 $children[] = $newChild; 35 } 36 37 parent::__construct(...$children); 38 } 39 40 public function getType() 41 { 42 return ord($this->identifier); 43 } 44 45 public function getIdentifier() 46 { 47 return $this->identifier; 48 } 49 50 protected function calculateContentLength() 51 { 52 return $this->contentLength; 53 } 54 55 protected function getEncodedValue() 56 { 57 return ''; 58 } 59 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |