r110160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110159‎ | r110160 | r110161 >
Date:20:13, 27 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Reuse constants for array keys
Modified paths:
  • /trunk/extensions/TorBlock/ASN1Parser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TorBlock/ASN1Parser.php
@@ -6,17 +6,17 @@
77 class ASN1Parser {
88 /* const */ static $tagClasses = array( 'universal', 'application', 'context-specific', 'private' );
99 /* const */ static $tagNames = array(
10 - 2 => 'INTEGER',
11 - 3 => 'BIT STRING',
12 - 4 => 'OCTET STRING',
13 - 5 => 'NULL',
14 - 6 => 'OBJECT IDENTIFIER',
15 - 16 => 'SEQUENCE',
16 - 17 => 'SET',
17 - 19 => 'PrintableString',
18 - 20 => 'T61String',
19 - 22 => 'IA5String',
20 - 23 => 'UTCTime'
 10+ self::INTEGER => 'INTEGER',
 11+ self::BIT_STRING => 'BIT STRING',
 12+ self::OCTET_STRING => 'OCTET STRING',
 13+ self::NULL => 'NULL',
 14+ self::OBJECT_IDENTIFIER => 'OBJECT IDENTIFIER',
 15+ self::SEQUENCE => 'SEQUENCE',
 16+ self::SET => 'SET',
 17+ self::PrintableString => 'PrintableString',
 18+ self::T61String => 'T61String',
 19+ self::IA5String => 'IA5String',
 20+ self::UTCTime => 'UTCTime'
2121 );
2222
2323 const INTEGER = 2;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105244Parser of ASN1 syntax used in RSA keys.platonides23:28, 5 December 2011

Status & tagging log