Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 1.47 KB

ASN1::decodeBER.md

File metadata and controls

60 lines (48 loc) · 1.47 KB
title package packageTitle layout className type
ASN1::decodeBER — Core Library
lib
Core Library
default
ASN1
method

ASN1::decodeBER

Decode a BER-encoded ASN.1 structure.

Synopsis

uses('asn1');

public static function array ASN1::decodeBER(string [in] $binary)

Description

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.

Parameters

Name Direction Type Description
$binary in string The BER-encoded ASN.1 structure

Return Value

An indexed array representing the ASN.1 structure.