1 | <?php |
||
21 | class ObjectDigestInfo |
||
22 | { |
||
23 | const TYPE_PUBLIC_KEY = 0; |
||
24 | const TYPE_PUBLIC_KEY_CERT = 1; |
||
25 | const TYPE_OTHER_OBJECT_TYPES = 2; |
||
26 | |||
27 | /** |
||
28 | * Object type. |
||
29 | * |
||
30 | * @var int $_digestedObjectType |
||
31 | */ |
||
32 | protected $_digestedObjectType; |
||
33 | |||
34 | /** |
||
35 | * OID of other object type. |
||
36 | * |
||
37 | * @var string|null $_otherObjectTypeID |
||
38 | */ |
||
39 | protected $_otherObjectTypeID; |
||
40 | |||
41 | /** |
||
42 | * Digest algorithm. |
||
43 | * |
||
44 | * @var AlgorithmIdentifierType $_digestAlgorithm |
||
45 | */ |
||
46 | protected $_digestAlgorithm; |
||
47 | |||
48 | /** |
||
49 | * Object digest. |
||
50 | * |
||
51 | * @var BitString $_objectDigest |
||
52 | */ |
||
53 | protected $_objectDigest; |
||
54 | |||
55 | /** |
||
56 | * Constructor. |
||
57 | * |
||
58 | * @param int $type |
||
59 | * @param AlgorithmIdentifierType $algo |
||
60 | * @param BitString $digest |
||
61 | */ |
||
62 | 5 | public function __construct(int $type, AlgorithmIdentifierType $algo, |
|
70 | |||
71 | /** |
||
72 | * Initialize from ASN.1. |
||
73 | * |
||
74 | * @param Sequence $seq |
||
75 | * @return self |
||
76 | */ |
||
77 | 4 | public static function fromASN1(Sequence $seq): ObjectDigestInfo |
|
95 | |||
96 | /** |
||
97 | * Generate ASN.1 structure. |
||
98 | * |
||
99 | * @return Sequence |
||
100 | */ |
||
101 | 5 | public function toASN1(): Sequence |
|
111 | } |
||
112 |