/plugin/gtime/gtlib/asn1/ |
D | ASN1Object.php | 39 * @param array $bytes the bytes to append 42 protected function append(&$stream, $bytes) { argument 44 if (!is_array($bytes)) { 45 $bytes = array($bytes); 48 foreach ($bytes as $b) { 57 * @param array $bytes the bytes to prepend 60 protected function prepend(&$stream, $bytes) { argument 62 if (!is_array($bytes)) { 63 $bytes = array($bytes); 66 for ($i = count($bytes) - 1; $i >= 0; $i--) { [all …]
|
D | ASN1Tag.php | 32 private $bytes; variable in ASN1Tag 43 public function decodeDER($bytes) { argument 44 $this->bytes = $bytes; 57 $bytes = array(); 62 $this->append($bytes, $this->object->encodeDER()); 64 } else if ($this->bytes != null) { 67 $this->append($bytes, $this->bytes); 77 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 78 $this->prepend($bytes, array(0)); // placeholder 104 $bytes[0] = $tag; [all …]
|
D | ASN1Integer.php | 72 $bytes = $this->value->toBytes(); 76 while (count($bytes) > 0) { 78 if ($bytes[0] == 0x0) { 79 array_shift($bytes); 87 if ($bytes[0] >> 7 == 1) { 88 array_unshift($bytes, 0xFF); 91 $bytes[0] = ($bytes[0] | 0x80) & 0xFF; 96 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 97 $this->prepend($bytes, ASN1DER::encodeType(ASN1_TAG_INTEGER)); 99 return $bytes; [all …]
|
D | ASN1DER.php | 58 $bytes = array(); 68 array_push($bytes, $size | 0x80); 75 array_push($bytes, $byte); 80 array_push($bytes, $length); 84 return $bytes; 109 * @param array $bytes the byte stream 112 public static function decode($bytes) { argument 114 if (empty($bytes)) { 118 $object = ASN1DER::decodeType($bytes); 119 $length = ASN1DER::decodeLength($bytes); [all …]
|
D | ASN1Boolean.php | 71 $bytes = array(); 73 $this->append($bytes, ASN1DER::encodeType(ASN1_TAG_BOOLEAN)); 74 $this->append($bytes, ASN1DER::encodeLength(1)); 77 $this->append($bytes, 0xFF); 79 $this->append($bytes, 0x0); 82 return $bytes; 89 * @param array $bytes V bytes from the encoding of ASN1Boolean TLV 92 public function decodeDER($bytes) { argument 94 if (count($bytes) != 1) { 95 throw new GTException("Invalid DER length for ASN1Boolean: " . count($bytes)); [all …]
|
D | ASN1BitString.php | 72 $bytes = array(); 82 $this->append($bytes, bindec($byte)); 85 $this->prepend($bytes, $padding); 86 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 87 $this->prepend($bytes, ASN1DER::encodeType(ASN1_TAG_BIT_STRING)); 89 return $bytes; 96 * @param array $bytes V bytes from the encoding of ASN1BitString TLV 99 public function decodeDER($bytes) { argument 103 $padding = $this->readByte($bytes); 109 while (count($bytes) > 0) { [all …]
|
D | ASN1Set.php | 84 $bytes = array(); 87 $this->append($bytes, $object->encodeDER()); 90 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 91 $this->prepend($bytes, ASN1DER::encodeType(ASN1_TAG_SET)); 93 return $bytes; 102 public function decodeDER($bytes) { argument 104 while (count($bytes) > 0) { 106 $object = ASN1DER::decodeType($bytes); 107 $length = ASN1DER::decodeLength($bytes); 109 $object->decodeDER($this->readBytes($bytes, $length));
|
D | ASN1Sequence.php | 85 $bytes = array(); 88 $this->append($bytes, $object->encodeDER()); 91 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 92 $this->prepend($bytes, ASN1DER::encodeType(ASN1_TAG_SEQUENCE)); 94 return $bytes; 103 public function decodeDER($bytes) { argument 105 while (count($bytes) > 0) { 107 $object = ASN1DER::decodeType($bytes); 108 $length = ASN1DER::decodeLength($bytes); 110 $object->decodeDER($this->readBytes($bytes, $length));
|
D | ASN1Null.php | 45 $bytes = array(); 47 $this->append($bytes, ASN1DER::encodeType(ASN1_TAG_NULL)); 48 $this->append($bytes, 0x0); 50 return $bytes; 59 * @param array $bytes null or empty array 62 public function decodeDER($bytes) { argument 64 if (!empty($bytes)) {
|
D | ASN1ObjectId.php | 86 $bytes = array(); 93 $this->append($bytes, ($b1 * 40 + $b2)); 121 $this->append($bytes, (int) $integer->bitAnd($mask2)->getValue()); 124 … $this->append($bytes, (int) $integer->shiftRight($i)->bitAnd($mask2)->bitOr($mask1)->getValue()); 130 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 131 $this->prepend($bytes, ASN1DER::encodeType(ASN1_TAG_OBJECT_ID)); 133 return $bytes; 143 public function decodeDER($bytes) { argument 149 for ($i = 0; $i < count($bytes); $i++) { 155 $byte = $bytes[$i]; [all …]
|
D | ASN1OctetString.php | 67 $bytes = array(); 69 $this->append($bytes, ASN1DER::encodeType(ASN1_TAG_OCTET_STRING)); 70 $this->append($bytes, ASN1DER::encodeLength(count($this->value))); 71 $this->append($bytes, $this->value); 73 return $bytes; 82 public function decodeDER($bytes) { argument 83 $this->value = $bytes;
|
D | ASN1String.php | 53 $bytes = GTUtil::toByteArray($this->value); 55 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes))); 56 $this->prepend($bytes, ASN1DER::encodeType($this->getType())); 58 return $bytes; 67 public function decodeDER($bytes) { argument 68 $this->setValue(GTUtil::fromByteArray($bytes));
|
/plugin/gtime/gtlib/http/ |
D | GTHttpClient.php | 54 $bytes = $request->encodeDER(); 55 $bytes = GTUtil::fromByteArray($bytes); 63 curl_setopt($curl, CURLOPT_POSTFIELDS, $bytes); 65 $bytes = curl_exec($curl); 67 if ($bytes === false) { 71 $bytes = GTUtil::toByteArray($bytes); 74 $response->decode(ASN1DER::decode($bytes)); 93 $bytes = $request->encodeDER(); 94 $bytes = GTUtil::fromByteArray($bytes); 102 curl_setopt($curl, CURLOPT_POSTFIELDS, $bytes); [all …]
|
/plugin/ipban/ip-lib/src/Address/ |
D | IPv4.php | 28 protected $bytes; variable in IPLib\\Address\\IPv4 59 $this->bytes = null; 104 * @param int[]|array $bytes 108 public static function fromBytes(array $bytes) argument 111 if (count($bytes) === 4) { 116 $bytes 157 if ($this->bytes === null) { 158 $this->bytes = array_map( 166 return $this->bytes; 311 $bytes = $this->getBytes(); [all …]
|
/plugin/gtime/gtlib/tsp/ |
D | GTHashChain.php | 47 * @param array $bytes hash chain bytes 50 private function __construct(array $bytes, $checkLevel) { argument 52 if (empty($bytes)) { 56 if (!is_array($bytes)) { 62 for ($i = 0; $i < count($bytes);) { 64 $algorithm = GTHashAlgorithm::getByGtid($bytes[$i++]); 66 if ($i >= count($bytes)) { 70 $direction = $bytes[$i++]; 72 if ($i >= count($bytes)) { 80 $siblingAlgorithm = GTHashAlgorithm::getByGtid($bytes[$i++]); [all …]
|
/plugin/gtime/gtlib/util/ |
D | GTBigInteger.php | 57 $bytes = $value; 62 $length = count($bytes); 68 if ($bytes[0] >> 7 == 1) { 73 $bytes[$i] = ~$bytes[$i] & 0xFF; 78 $value = bcadd($value, bcmul($bytes[$i], bcpow(256, $length - $i - 1, 0), 0), 0); 339 $bytes = GTUtil::toByteArray($result); 343 for ($i = 0; $i < count($bytes); $i++) { 344 $bytes[$i] = ~$bytes[$i] & 0xFF; 347 array_unshift($bytes, 0x0); 349 $int = new GTBigInteger($bytes); [all …]
|
D | GTBase16.php | 40 * @param array $bytes an array containing the bytes to encode. 45 public static function encode(array $bytes, $offset = null, $length = null) { argument 46 return self::getInstance()->encode($bytes, $offset, $length); 53 * @param array $bytes an array containing the bytes to encode 58 public static function encodeWithColons(array $bytes, $offset = null, $length = null) { argument 59 return self::getInstance()->encode($bytes, $offset, $length, ':', 2); 66 * @param array $bytes an array containing the bytes to encode 71 public static function encodeWithSpaces(array $bytes, $offset = null, $length = null) { argument 72 return self::getInstance()->encode($bytes, $offset, $length, ' ', 2);
|
D | GTBase32.php | 40 * @param array $bytes an array containing the bytes to encode. 45 public static function encode(array $bytes, $offset = null, $length = null) { argument 46 return self::getInstance()->encode($bytes, $offset, $length); 53 * @param array $bytes an array containing the bytes to encode 58 public static function encodeWithDashes(array $bytes, $offset = null, $length = null) { argument 59 return self::getInstance()->encode($bytes, $offset, $length, '-', 6);
|
/plugin/authgooglesheets/vendor/monolog/monolog/src/Monolog/Processor/ |
D | MemoryProcessor.php | 44 * @param int $bytes 47 protected function formatBytes(int $bytes) argument 50 return $bytes; 53 if ($bytes > 1024 * 1024) { 54 return round($bytes / 1024 / 1024, 2).' MB'; 55 } elseif ($bytes > 1024) { 56 return round($bytes / 1024, 2).' KB'; 59 return $bytes . ' B';
|
/plugin/pureldap/vendor/freedsx/asn1/src/FreeDSx/Asn1/Encoder/ |
D | BerEncoder.php | 187 $bytes = $type->getValue() ? self::BOOL_TRUE : self::BOOL_FALSE; 191 $bytes = $this->encodeInteger($type); 194 $bytes = $this->encodeReal($type); 197 $bytes = $type->getValue(); 200 $bytes = $this->encodeSetOf($type); 203 $bytes = $this->encodeSet($type); 206 $bytes = $this->encodeConstructedType(...$type->getChildren()); 209 $bytes = $this->encodeBitString($type); 212 $bytes = $this->encodeOid($type); 215 $bytes = $this->encodeRelativeOid($type); [all …]
|
/plugin/pureldap/vendor/freedsx/socket/src/FreeDSx/Socket/Queue/ |
D | Buffer.php | 23 protected $bytes; variable in FreeDSx\\Socket\\Queue\\Buffer 31 * @param string $bytes 34 public function __construct($bytes, int $endsAt) argument 36 $this->bytes = $bytes; 43 public function bytes() function in FreeDSx\\Socket\\Queue\\Buffer 45 return $this->bytes;
|
D | MessageQueue.php | 88 $bytes = $this->socket->read(); 90 if ($bytes === false) { 94 $this->buffer .= $bytes; 102 $this->toConsume .= $buffer->bytes(); 155 * @param string $bytes 158 protected function unwrap($bytes) : Buffer argument 160 return new Buffer($bytes, \strlen($bytes)); 167 * @param string $bytes 171 protected abstract function decode($bytes) : Message; argument
|
/plugin/quickstats/GEOIP/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/ |
D | Decoder.php | 134 $bytes = Util::read($this->fileStream, $offset, $size); 138 return [$bytes, $newOffset]; 142 return [$this->decodeDouble($bytes), $newOffset]; 146 return [$this->decodeFloat($bytes), $newOffset]; 148 return [$this->decodeInt32($bytes, $size), $newOffset]; 153 return [$this->decodeUint($bytes, $size), $newOffset]; 213 private function decodeInt32($bytes, $size) argument 221 $bytes = str_pad($bytes, 4, "\x00", STR_PAD_LEFT); 231 list(, $int) = unpack('l', $this->maybeSwitchByteOrder($bytes)); 298 private function decodeUint($bytes, $byteLength) argument [all …]
|
/plugin/fedauth/Auth/OpenID/ |
D | BigMath.php | 58 $bytes = array(); 61 array_unshift($bytes, $this->mod($long, 256)); 65 if ($bytes && ($bytes[0] > 127)) { 66 array_unshift($bytes, 0); 70 foreach ($bytes as $byte) { 94 $bytes = array_merge(unpack('C*', $str)); 98 if ($bytes && ($bytes[0] > 127)) { 104 foreach ($bytes as $byte) { 153 $nbytes = Auth_OpenID::bytes($rbytes) - 1; 155 $nbytes = Auth_OpenID::bytes($rbytes); [all …]
|
/plugin/gtime/gtlib/asn1/gt/ |
D | GTPublishedData.php | 114 $bytes = $int->toBytes(); 117 while (count($bytes) % 8 != 0) { 118 array_unshift($bytes, 0); 122 array_push($bytes, $byte); 125 $bytes = GTUtil::addCrc32($bytes); 127 return GTBase32::encodeWithDashes($bytes);
|