BMPString
extends AbstractString
in package
Class ASNObject is the base class for all concrete ASN.1 objects.
Table of Contents
- $value : string
- $allowedCharacters : mixed
- $checkStringForIllegalChars : mixed
- $contentLength : mixed
- $nrOfLengthOctets : mixed
- __construct() : mixed
- Creates a new ASN.1 BMP String.
- __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() : mixed
- getTypeName() : mixed
- Returns the name of the ASN.1 Type of this object.
- isValid() : mixed
- allowAll() : mixed
- allowAllLetters() : mixed
- allowCapitalLetters() : mixed
- allowCharacter() : mixed
- allowCharacters() : mixed
- allowNumbers() : mixed
- allowSmallLetters() : mixed
- allowSpaces() : mixed
- calculateContentLength() : int
- Must return the number of octets of the content part.
- checkString() : mixed
- getContentLength() : mixed
- getEncodedValue() : string
- Encode the object using DER encoding.
- getNumberOfLengthOctets() : mixed
- parseBinaryIdentifier() : mixed
- parseContentLength() : mixed
- parseIdentifier() : mixed
- setContentLength() : mixed
- createLengthPart() : mixed
Properties
$value
protected
string
$value
$allowedCharacters
private
mixed
$allowedCharacters
= []
$checkStringForIllegalChars
private
mixed
$checkStringForIllegalChars
= true
$contentLength
private
mixed
$contentLength
$nrOfLengthOctets
private
mixed
$nrOfLengthOctets
Methods
__construct()
Creates a new ASN.1 BMP String.
public
__construct(string $string) : mixed
BMPString is a subtype of UniversalString that has its own unique tag and contains only the characters in the Basic Multilingual Plane (those corresponding to the first 64K-2 cells, less cells whose encoding is used to address characters outside the Basic Multilingual Plane) of ISO/IEC 10646-1.
TODO The encodable characters of this type are not yet checked.
Parameters
- $string : string
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(string &$binaryData[, int &$offsetIndex = 0 ]) : ASNObject
Parameters
- $binaryData : string
- $offsetIndex : int = 0
Tags
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
abstract 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()
public
getType() : mixed
Return values
mixed —getTypeName()
Returns the name of the ASN.1 Type of this object.
public
getTypeName() : mixed
Tags
Return values
mixed —isValid()
public
static isValid(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —allowAll()
protected
allowAll() : mixed
Return values
mixed —allowAllLetters()
protected
allowAllLetters() : mixed
Return values
mixed —allowCapitalLetters()
protected
allowCapitalLetters() : mixed
Return values
mixed —allowCharacter()
protected
allowCharacter(mixed $character) : mixed
Parameters
- $character : mixed
Return values
mixed —allowCharacters()
protected
allowCharacters(mixed ...$characters) : mixed
Parameters
- $characters : mixed
Return values
mixed —allowNumbers()
protected
allowNumbers() : mixed
Return values
mixed —allowSmallLetters()
protected
allowSmallLetters() : mixed
Return values
mixed —allowSpaces()
protected
allowSpaces() : mixed
Return values
mixed —calculateContentLength()
Must return the number of octets of the content part.
protected
abstract calculateContentLength() : int
Return values
int —checkString()
protected
checkString() : mixed
Return values
mixed —getContentLength()
protected
getContentLength() : mixed
Return values
mixed —getEncodedValue()
Encode the object using DER encoding.
protected
abstract getEncodedValue() : string
Tags
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 —setContentLength()
protected
setContentLength(mixed $newContentLength) : mixed
Parameters
- $newContentLength : mixed
Return values
mixed —createLengthPart()
private
createLengthPart() : mixed