Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 319) sorted by relevance

12345678910>>...13

/plugin/gtime/gtlib/asn1/
H A DASN1Object.php39 * @param array $bytes the bytes to append
44 if (!is_array($bytes)) {
45 $bytes = array($bytes);
48 foreach ($bytes as $b) {
62 if (!is_array($bytes)) {
63 $bytes = array($bytes);
67 array_unshift($stream, $bytes[$i]);
80 $bytes = $this->readBytes($stream, 1);
82 return array_shift($bytes);
104 $bytes = array();
[all …]
H A DASN1Tag.php32 private $bytes; variable in ASN1Tag
43 public function decodeDER($bytes) { argument
44 $this->bytes = $bytes;
57 $bytes = array();
64 } else if ($this->bytes != null) {
67 $this->append($bytes, $this->bytes);
77 $this->prepend($bytes, ASN1DER::encodeLength(count($bytes)));
104 $bytes[0] = $tag;
106 return $bytes;
124 if (count($this->bytes) > 0) {
[all …]
H A DASN1Integer.php72 $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)));
99 return $bytes;
108 public function decodeDER($bytes) { argument
[all …]
H A DASN1DER.php58 $bytes = array();
84 return $bytes;
114 if (empty($bytes)) {
121 if (count($bytes) < $length) {
125 if (count($bytes) > $length) {
129 $object->decodeDER($bytes);
144 if (!is_array($bytes)) {
148 if (count($bytes) == 0) {
192 if (!is_array($bytes)) {
196 if (count($bytes) < 1) {
[all …]
H A DASN1Boolean.php71 $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 …]
H A DASN1BitString.php72 $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 …]
H A DASN1Sequence.php85 $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));
H A DASN1Set.php84 $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));
H A DASN1Null.php45 $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)) {
H A DASN1ObjectId.php86 $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 …]
H A DASN1OctetString.php67 $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;
H A DASN1String.php53 $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/
H A DGTHttpClient.php55 $bytes = GTUtil::fromByteArray($bytes);
65 $bytes = curl_exec($curl);
67 if ($bytes === false) {
71 $bytes = GTUtil::toByteArray($bytes);
94 $bytes = GTUtil::fromByteArray($bytes);
104 $bytes = curl_exec($curl);
106 if ($bytes === false) {
110 $bytes = GTUtil::toByteArray($bytes);
173 $bytes = GTUtil::fromByteArray($bytes);
189 $bytes = GTUtil::toByteArray($bytes);
[all …]
/plugin/ipban/ip-lib/src/Address/
H A DIPv4.php28 protected $bytes; variable in IPLib\\Address\\IPv4
59 $this->bytes = null;
104 * @param int[]|array $bytes
111 if (count($bytes) === 4) {
116 $bytes
157 if ($this->bytes === null) {
166 return $this->bytes;
318 $bytes[$i] = 0;
320 ++$bytes[$i];
343 $bytes[$i] = 255;
[all …]
/plugin/gtime/gtlib/tsp/
H A DGTHashChain.php52 if (empty($bytes)) {
56 if (!is_array($bytes)) {
62 for ($i = 0; $i < count($bytes);) {
66 if ($i >= count($bytes)) {
70 $direction = $bytes[$i++];
72 if ($i >= count($bytes)) {
85 if ($i >= count($bytes)) {
88 $level = $bytes[$i++] & 0xFF;
109 if (empty($bytes)) {
113 if (!is_array($bytes)) {
[all …]
/plugin/authgooglesheets/vendor/monolog/monolog/src/Monolog/Processor/
H A DMemoryProcessor.php44 * @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/gtime/gtlib/util/
H A DGTBase16.php40 * @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);
H A DGTBigInteger.php57 $bytes = $value;
62 $length = count($bytes);
68 if ($bytes[0] >> 7 == 1) {
73 $bytes[$i] = ~$bytes[$i] & 0xFF;
344 $bytes[$i] = ~$bytes[$i] & 0xFF;
352 $bytes = $int->toBytes();
355 while (count($bytes) > 0 && $bytes[0] == 0x0) {
356 array_shift($bytes);
359 return $bytes;
364 if (count($bytes) > 0 && $bytes[0] >> 7 == 1) {
[all …]
H A DGTBase32.php40 * @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/pureldap/vendor/freedsx/socket/src/FreeDSx/Socket/Queue/
H A DBuffer.php23 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;
H A DMessageQueue.php88 $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));
164 * Decode the bytes to an object. If you have a partial object, throw the PartialMessageException and the queue
167 * @param string $bytes
171 decode($bytes) global() argument
[all...]
/plugin/pureldap/vendor/freedsx/asn1/src/FreeDSx/Asn1/Encoder/
H A DBerEncoder.php187 $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
[all...]
/plugin/quickstats/GEOIP/vendor/maxmind-db/reader/src/MaxMind/Db/Reader/
H A DDecoder.php134 $bytes = Util::read($this->fileStream, $offset, $size);
138 return [$bytes, $newOffset];
213 private function decodeInt32($bytes, $size) argument
221 $bytes = str_pad($bytes, 4, "\x00", STR_PAD_LEFT);
298 private function decodeUint($bytes, $byteLength) argument
307 $part = \ord($bytes[$i]);
338 $size = 29 + \ord($bytes);
340 list(, $adjust) = unpack('n', $bytes);
343 list(, $adjust) = unpack('N', "\x00" . $bytes);
351 private function maybeSwitchByteOrder($bytes) argument
[all …]
/plugin/gtime/gtlib/asn1/gt/
H A DGTPublishedData.php114 $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);
/plugin/fedauth/Auth/OpenID/
H A DBigMath.php58 $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 …]

12345678910>>...13