CertificateSubject
extends Sequence
in package
implements
Parsable
Class ASNObject is the base class for all concrete ASN.1 objects.
Table of Contents
Interfaces
- Parsable
- The Parsable interface describes classes that can be parsed from their binary DER representation.
Properties
- $children : array<string|int, ASNObject>
- $commonName : mixed
- $contentLength : mixed
- $country : mixed
- $email : mixed
- $iteratorPosition : mixed
- $locality : mixed
- $nrOfLengthOctets : mixed
- $organization : mixed
- $organizationalUnit : mixed
- $state : mixed
Methods
- __construct() : mixed
- __toString() : mixed
- addChild() : mixed
- addChildren() : mixed
- count() : mixed
- current() : mixed
- fromBinary() : Construct|static
- Parse an instance of this class from its binary DER encoded representation.
- getBinary() : string
- Encode this object using DER encoding.
- getChildren() : array<string|int, ASNObject>
- getCommonName() : mixed
- getContent() : mixed
- Return the content of this object in a non encoded form.
- getCountry() : mixed
- getEmail() : mixed
- getFirstChild() : ASNObject
- 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.
- getIterator() : mixed
- getLocality() : mixed
- getNumberOfChildren() : mixed
- getObjectLength() : mixed
- Returns the length of the whole object (including the identifier and length octets).
- getOrganization() : mixed
- getOrganizationalUnit() : mixed
- getState() : mixed
- getType() : int
- Return the object type octet.
- getTypeName() : mixed
- Returns the name of the ASN.1 Type of this object.
- key() : mixed
- next() : mixed
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- rewind() : mixed
- valid() : mixed
- 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
- setContentLength() : mixed
- createLengthPart() : mixed
Properties
$children
protected
array<string|int, ASNObject>
$children
$commonName
private
mixed
$commonName
$contentLength
private
mixed
$contentLength
$country
private
mixed
$country
private
mixed
$email
$iteratorPosition
private
mixed
$iteratorPosition
$locality
private
mixed
$locality
$nrOfLengthOctets
private
mixed
$nrOfLengthOctets
$organization
private
mixed
$organization
$organizationalUnit
private
mixed
$organizationalUnit
$state
private
mixed
$state
Methods
__construct()
public
__construct(string $commonName, string $email, string $organization, string $locality, string $state, string $country, string $organizationalUnit) : mixed
Parameters
- $commonName : string
- $email : string
- $organization : string
- $locality : string
- $state : string
- $country : string
- $organizationalUnit : string
__toString()
public
__toString() : mixed
addChild()
public
addChild(ASNObject $child) : mixed
Parameters
- $child : ASNObject
addChildren()
public
addChildren(array<string|int, mixed> $children) : mixed
Parameters
- $children : array<string|int, mixed>
count()
public
count([mixed $mode = COUNT_NORMAL ]) : mixed
Parameters
- $mode : mixed = COUNT_NORMAL
current()
public
current() : mixed
fromBinary()
Parse an instance of this class from its binary DER encoded representation.
public
static fromBinary(mixed &$binaryData[, mixed &$offsetIndex = 0 ]) : Construct|static
Parameters
- $binaryData : mixed
- $offsetIndex : mixed = 0
Return values
Construct|staticgetBinary()
Encode this object using DER encoding.
public
getBinary() : string
Return values
string —the full binary representation of the complete object
getChildren()
public
getChildren() : array<string|int, ASNObject>
Return values
array<string|int, ASNObject>getCommonName()
public
getCommonName() : mixed
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.
getCountry()
public
getCountry() : mixed
getEmail()
public
getEmail() : mixed
getFirstChild()
public
getFirstChild() : ASNObject
Return values
ASNObjectgetIdentifier()
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
getIterator()
public
getIterator() : mixed
getLocality()
public
getLocality() : mixed
getNumberOfChildren()
public
getNumberOfChildren() : mixed
getObjectLength()
Returns the length of the whole object (including the identifier and length octets).
public
getObjectLength() : mixed
getOrganization()
public
getOrganization() : mixed
getOrganizationalUnit()
public
getOrganizationalUnit() : mixed
getState()
public
getState() : mixed
getType()
Return the object type octet.
public
getType() : int
This should use the class constants of Identifier.
Return values
intgetTypeName()
Returns the name of the ASN.1 Type of this object.
public
getTypeName() : mixed
Tags
key()
public
key() : mixed
next()
public
next() : mixed
offsetExists()
public
offsetExists(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
rewind()
public
rewind() : mixed
valid()
public
valid() : mixed
calculateContentLength()
Must return the number of octets of the content part.
protected
calculateContentLength() : int
Return values
intgetContentLength()
protected
getContentLength() : 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
parseBinaryIdentifier()
protected
static parseBinaryIdentifier(mixed $binaryData, mixed &$offsetIndex) : mixed
Parameters
- $binaryData : mixed
- $offsetIndex : mixed
parseContentLength()
protected
static parseContentLength(mixed &$binaryData, mixed &$offsetIndex[, mixed $minimumLength = 0 ]) : mixed
Parameters
- $binaryData : mixed
- $offsetIndex : mixed
- $minimumLength : mixed = 0
parseIdentifier()
protected
static parseIdentifier(mixed $identifierOctet, mixed $expectedIdentifier, mixed $offsetForExceptionHandling) : mixed
Parameters
- $identifierOctet : mixed
- $expectedIdentifier : mixed
- $offsetForExceptionHandling : mixed
setContentLength()
protected
setContentLength(mixed $newContentLength) : mixed
Parameters
- $newContentLength : mixed
createLengthPart()
private
createLengthPart() : mixed