Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
226 | daniel-mar | 1 | <?php |
2 | |||
3 | # if (!interface_exists('OIDPlusFieldExtenders')) throw new Exception('Required interface "OIDPlusFieldExtenders" not found.'); |
||
4 | # if (!class_exists('OIDPlus')) throw new Exception('Required class "OIDPlus" not found.'); |
||
5 | |||
6 | require_once __DIR__ . '/../../core/OIDPlusFieldExtenders.class.php'; |
||
7 | require_once __DIR__ . '/../../includes/OidDerConverter.class.phps'; |
||
8 | |||
9 | class DEREncodingFieldExtender implements OIDPlusFieldExtenders { |
||
10 | public static function processOID($oid, &$out, &$oidplusobj) { |
||
11 | $out[] = 'der-encoding:'.OidDerConverter::hexarrayToStr(OidDerConverter::oidToDER($oid)); |
||
12 | } |
||
13 | } |
||
14 | |||
15 | require_once __DIR__ . '/../../core/2_OIDPlus.class.php'; |
||
16 | OIDPlus::registerFieldExtender(new DEREncodingFieldExtender()); |