title | package | packageTitle | layout | className | type |
---|---|---|---|---|---|
ASN1::decodeBER — Core Library |
lib |
Core Library |
default |
ASN1 |
method |
Decode a BER-encoded ASN.1 structure.
uses('asn1');
public static function array ASN1::decodeBER(string [in] $binary)
ASN1::decodeBER()
provides limited support for decoding a binary ASN.1
structure which was encoded using the Basic Encoding Rules (BER), such
as X.509 certificate data.
Each member of the returned array is itself an associative array with
the following fields: $type
, $pc
, $class
, $len
,
and $data
(note that $data
is base-64 encoded).
For entries which are sequences, the $sequence
member is an
indexed array of structures.
For entries which are bit-strings, the $value
member is set to the
value of the bit-string, and the $unused
member is set to the
number of leading unused bits in the string.
Name | Direction | Type | Description |
---|---|---|---|
$binary
| in | string | The BER-encoded ASN.1 structure |
An indexed array representing the ASN.1 structure.