1<?php
2
3/**
4 * SpecifiedECDomain
5 *
6 * From: http://www.secg.org/sec1-v2.pdf#page=109
7 *
8 * PHP version 5
9 *
10 * @author    Jim Wigginton <terrafrost@php.net>
11 * @copyright 2016 Jim Wigginton
12 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
13 * @link      http://phpseclib.sourceforge.net
14 */
15
16namespace phpseclib3\File\ASN1\Maps;
17
18use phpseclib3\File\ASN1;
19
20/**
21 * SpecifiedECDomain
22 *
23 * @author  Jim Wigginton <terrafrost@php.net>
24 */
25abstract class SpecifiedECDomain
26{
27    const MAP = [
28        'type' => ASN1::TYPE_SEQUENCE,
29        'children' => [
30            'version' => [
31                'type' => ASN1::TYPE_INTEGER,
32                'mapping' => [1 => 'ecdpVer1', 'ecdpVer2', 'ecdpVer3']
33            ],
34            'fieldID' => FieldID::MAP,
35            'curve' => Curve::MAP,
36            'base' => ECPoint::MAP,
37            'order' => ['type' => ASN1::TYPE_INTEGER],
38            'cofactor' => [
39                'type' => ASN1::TYPE_INTEGER,
40                'optional' => true
41            ],
42            'hash' => ['optional' => true] + HashAlgorithm::MAP
43        ]
44    ];
45}
46