ObjectIdentifier
extends ASNObject
in package
implements
Parsable
Class ASNObject is the base class for all concrete ASN.1 objects.
Interfaces, Classes, Traits and Enums
- Parsable
- The Parsable interface describes classes that can be parsed from their binary DER representation.
Table of Contents
- $subIdentifiers : mixed
- $value : mixed
- $contentLength : mixed
- $nrOfLengthOctets : mixed
- __construct() : mixed
- __toString() : mixed
- fromBinary() : ASNObject
- Parse an instance of this class from its binary DER encoded representation.
- getBinary() : string
- Encode this object using DER encoding.
- getContent() : mixed
- Return the content of this object in a non encoded form.
- getIdentifier() : string
- Returns all identifier octets. If an inheriting class models a tag with the long form identifier format, it MUST reimplement this method to return all octets of the identifier.
- getObjectLength() : mixed
- Returns the length of the whole object (including the identifier and length octets).
- getType() : int
- Return the object type octet.
- getTypeName() : mixed
- Returns the name of the ASN.1 Type of this object.
- calculateContentLength() : int
- Must return the number of octets of the content part.
- getContentLength() : mixed
- getEncodedValue() : string
- Encode the object using DER encoding.
- getNumberOfLengthOctets() : mixed
- parseBinaryIdentifier() : mixed
- parseContentLength() : mixed
- parseIdentifier() : mixed
- parseOid() : string
- Parses an object identifier except for the first octet, which is parsed differently. This way relative object identifiers can also be parsed using this.
- setContentLength() : mixed
- createLengthPart() : mixed
Properties
$subIdentifiers
protected
mixed
$subIdentifiers
$value
protected
mixed
$value
$contentLength
private
mixed
$contentLength
$nrOfLengthOctets
private
mixed
$nrOfLengthOctets
Methods
__construct()
public
__construct(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —fromBinary()
Parse an instance of this class from its binary DER encoded representation.
public
static fromBinary(mixed &$binaryData[, mixed &$offsetIndex = 0 ]) : ASNObject
Parameters
- $binaryData : mixed
- $offsetIndex : mixed = 0
Return values
ASNObject —getBinary()
Encode this object using DER encoding.
public
getBinary() : string
Return values
string —the full binary representation of the complete object
getContent()
Return the content of this object in a non encoded form.
public
getContent() : mixed
This can be used to print the value in human readable form.
Return values
mixed —getIdentifier()
Returns all identifier octets. If an inheriting class models a tag with the long form identifier format, it MUST reimplement this method to return all octets of the identifier.
public
getIdentifier() : string
Tags
Return values
string —Identifier as a set of octets
getObjectLength()
Returns the length of the whole object (including the identifier and length octets).
public
getObjectLength() : mixed
Return values
mixed —getType()
Return the object type octet.
public
getType() : int
This should use the class constants of Identifier.
Return values
int —getTypeName()
Returns the name of the ASN.1 Type of this object.
public
getTypeName() : mixed
Tags
Return values
mixed —calculateContentLength()
Must return the number of octets of the content part.
protected
calculateContentLength() : int
Return values
int —getContentLength()
protected
getContentLength() : mixed
Return values
mixed —getEncodedValue()
Encode the object using DER encoding.
protected
getEncodedValue() : string
Return values
string —the binary representation of an objects value
getNumberOfLengthOctets()
protected
getNumberOfLengthOctets([mixed $contentLength = null ]) : mixed
Parameters
- $contentLength : mixed = null
Return values
mixed —parseBinaryIdentifier()
protected
static parseBinaryIdentifier(mixed $binaryData, mixed &$offsetIndex) : mixed
Parameters
- $binaryData : mixed
- $offsetIndex : mixed
Return values
mixed —parseContentLength()
protected
static parseContentLength(mixed &$binaryData, mixed &$offsetIndex[, mixed $minimumLength = 0 ]) : mixed
Parameters
- $binaryData : mixed
- $offsetIndex : mixed
- $minimumLength : mixed = 0
Return values
mixed —parseIdentifier()
protected
static parseIdentifier(mixed $identifierOctet, mixed $expectedIdentifier, mixed $offsetForExceptionHandling) : mixed
Parameters
- $identifierOctet : mixed
- $expectedIdentifier : mixed
- $offsetForExceptionHandling : mixed
Return values
mixed —parseOid()
Parses an object identifier except for the first octet, which is parsed differently. This way relative object identifiers can also be parsed using this.
protected
static parseOid( &$binaryData, &$offsetIndex, $octetsToRead) : string
Parameters
Tags
Return values
string —setContentLength()
protected
setContentLength(mixed $newContentLength) : mixed
Parameters
- $newContentLength : mixed
Return values
mixed —createLengthPart()
private
createLengthPart() : mixed