PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / lib / packages / FG / ASN1 / UnknownObject.php

UnknownObject.php in Defender Security – Malware Scanner, Login Security & Firewall 6.3.0, at lib/packages/FG/ASN1/UnknownObject.php

60 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 WP_DEFENDER_VENDOR\FG\ASN1;
12
13 class UnknownObject extends ASNObject
14 {
15 /** @var string */
16 private $value;
17
18 private $identifier;
19
20 /**
21 * @param string|int $identifier Either the first identifier octet as int or all identifier bytes as a string
22 * @param int $contentLength
23 */
24 public function __construct($identifier, $contentLength)
25 {
26 if (is_int($identifier)) {
27 $identifier = chr($identifier);
28 }
29
30 $this->identifier = $identifier;
31 $this->value = "Unparsable Object ({$contentLength} bytes)";
32 $this->setContentLength($contentLength);
33 }
34
35 public function getContent()
36 {
37 return $this->value;
38 }
39
40 public function getType()
41 {
42 return ord($this->identifier[0]);
43 }
44
45 public function getIdentifier()
46 {
47 return $this->identifier;
48 }
49
50 protected function calculateContentLength()
51 {
52 return $this->getContentLength();
53 }
54
55 protected function getEncodedValue()
56 {
57 return '';
58 }
59 }
60