Lines Matching defs:type

107      * If the mapping type is self::TYPE_ANY what do we actually encode it as?
135 * Type mapping table for the ANY type.
169 * String type to character size mapping table.
229 $type = ord($encoded[$encoded_pos++]);
232 $constructed = ($type >> 5) & 1;
234 $tag = $type & 0x1F;
292 built-in types. It defines an application-independent data type that must be distinguishable from all other
297 data type; the term CONTEXT-SPECIFIC does not appear.
300 $class = ($type >> 6) & 3;
307 'type' => $class,
336 'type' => $class,
347 $current += ['type' => $tag];
382 if ($temp[$i]['type'] != self::TYPE_BIT_STRING) {
388 if ($temp[$last]['type'] != self::TYPE_BIT_STRING) {
407 if ($temp['type'] != self::TYPE_OCTET_STRING) {
457 /* Each character string type shall be encoded as if it had been declared:
526 case $mapping['type'] == self::TYPE_ANY:
527 $intype = $decoded['type'];
534 return [$inmap => self::asn1map($decoded, ['type' => $intype] + $mapping, $special)];
537 case $mapping['type'] == self::TYPE_CHOICE:
541 case !isset($option['constant']) && $option['type'] == $decoded['type']:
544 case !isset($option['constant']) && $option['type'] == self::TYPE_CHOICE:
560 case $decoded['type'] == $mapping['type']:
563 // if $decoded['type'] and $mapping['type'] are both strings, but different types of strings,
566 case $decoded['type'] < 18: // self::TYPE_NUMERIC_STRING == 18
567 case $decoded['type'] > 30: // self::TYPE_BMP_STRING == 30
568 case $mapping['type'] < 18:
569 case $mapping['type'] > 30:
575 $decoded['type'] = $mapping['type'];
578 switch ($decoded['type']) {
602 if ($child['type'] != self::TYPE_CHOICE) {
607 $tempClass = $temp['type'];
621 // Can only match if no constant expected and type matches or is generic.
622 $maymatch = !isset($child['constant']) && array_search($child['type'], [$temp['type'], self::TYPE_ANY, self::TYPE_CHOICE]) !== false;
670 $tempClass = $temp['type'];
678 if ($child['type'] != self::TYPE_CHOICE) {
693 // Can only match if no constant expected and type matches or is generic.
694 $maymatch = !isset($child['constant']) && array_search($child['type'], [$temp['type'], self::TYPE_ANY, self::TYPE_CHOICE]) !== false;
739 $decoded['content'] = self::decodeTime($decoded['content'], $decoded['type']);
749 "When a "NamedBitList" is used in defining a bitstring type ASN.1 encoding rules are free to add (or remove)
871 $tag = $mapping['type'];
895 if ($mapping['type'] == self::TYPE_SET) {
930 AUTOMATIC TAGS, but the type defined by "Type" is an untagged choice type, an untagged open type, or
933 if (isset($child['explicit']) || $child['type'] == self::TYPE_CHOICE) {
967 if (isset($child['explicit']) || $child['type'] == self::TYPE_CHOICE) {
1007 $format = $mapping['type'] == self::TYPE_UTC_TIME ? 'y' : 'Y';
1066 return self::encode_der(null, ['type' => self::TYPE_NULL] + $mapping, null, $special);
1069 return self::encode_der($source, ['type' => self::TYPE_INTEGER] + $mapping, null, $special);
1071 return self::encode_der($source, ['type' => self::TYPE_REAL] + $mapping, null, $special);
1073 return self::encode_der($source, ['type' => self::TYPE_BOOLEAN] + $mapping, null, $special);
1078 return self::encode_der($source[$typename], ['type' => $outtype] + $mapping, null, $special);
1114 throw new \RuntimeException('Mapping provides no type definition for ' . implode('/', self::$location));
1122 if (isset($mapping['explicit']) || $mapping['type'] == self::TYPE_CHOICE) {
1334 * String type conversion