Skip to content

Latest commit

 

History

History
191 lines (133 loc) · 10.2 KB

api.md

File metadata and controls

191 lines (133 loc) · 10.2 KB

Table of contents


Class: \vakata\asn1\ASN1

Visibility Function
public static OIDtoText(mixed $id) : void
public static TextToOID(mixed $text) : void
public static fromBase256(string $string) : integer/string the converted number
Convert a number from base256
public static toBase256(integer $number, integer $base=10) : string the number in base256
Convert a number to base256

Class: \vakata\asn1\ASN1Exception

Visibility Function

This class extends \Exception

This class implements \Throwable


Class: \vakata\asn1\Decoder

A class handling ASN1 decoding.

Visibility Function
public __construct(\vakata\asn1\Reader $reader) : void
Create an instance by passing in an instantiated reader.
public static fromFile(string $path) : \vakata\asn1\Decoder
Create a new instance from a file.
public static fromString(string $data) : \vakata\asn1\Decoder
Create a new instance from an ASN1 string.
public map(array $map, mixed $skeleton=null) : mixed in most cases this is an array, as all complex structures are either a sequence or a set
Map the parsed data to a map
public structure(mixed $max=null) : mixed in most cases this is an array, as all complex structures are either a sequence or a set
Dump the parsed structure of the ASN1 data.
public values(mixed $skeleton=null) : mixed in most cases this is an array, as all complex structures are either a sequence or a set
Dump the parsed values only.
protected decode(mixed $header) : void
protected header() : void

Class: \vakata\asn1\Encoder

A class handling ASN1 encoding.

Visibility Function
public static encode(mixed $source, array $mapping) : mixed raw DER output (base64_encode if needed), false on failure
Encode some data to DER using a mapping array.
protected static length(mixed $length) : void

Class: \vakata\asn1\Reader

Visibility Function
public __construct(mixed $stream) : void
public byte() : void
public bytes(mixed $amount=null) : void
public chunk(mixed $beg, mixed $length=null) : void
public eof() : void
public static fromFile(mixed $path) : void
public static fromString(mixed $data) : void
public pos() : void
public readUntil(mixed $val, bool $include=true) : void
public rewind() : void
public seek(mixed $pos) : void

Class: \vakata\asn1\structures\Certificate

A class for x509 certificate parsing

Visibility Function
public static map() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\Common

Visibility Function
public static AlgorithmIdentifier() : void
public static RDNSequence() : void
public static extensions() : void

Class: \vakata\asn1\structures\CRL

A class for CRL parsing

Visibility Function
public static map() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\OCSPRequest

Visibility Function
public static generate(\string $algorithm, \string $issuerNameHash, \string $issuerKeyHash, \string $serialNumber, \string $requestor=null) : void
public static map() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\OCSPResponse

A class for OCSP parsing

Visibility Function
public static map() : void
public subject() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\P7S

Visibility Function
public static map() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\Structure (abstract)

Visibility Function
public __construct(string $data) : void
Create an instance.
public __toString() : void
public static fromFile(string $path) : \vakata\asn1\structures\Structure
Create an instance from a file
public static fromString(string $data) : \vakata\asn1\structures\Structure
Create an instance from a string.
public structure() : array
Output the raw ASN1 structure of the data.
public toArray(\boolean $valuesOnly=false) : mixed
Get the mapped or values only view of the parsed data.
protected static abstract map() : void

Class: \vakata\asn1\structures\TimestampRequest

Visibility Function
public static generateFromData(string $data, bool/boolean/string $nonce=true, bool/boolean $requireCert=false, string $alg='sha1', string/null $policy=null) : string the raw timestamp request
Generate a timestamp request (tsq) for a string
public static generateFromFile(string $path, bool/boolean/string $nonce=true, bool/boolean $requireCert=false, string $alg='sha1', string/null $policy=null) : string the raw timestamp request
Generate a timestamp request (tsq) for a file path
public static generateFromHash(string $data, bool/boolean/string $nonce=true, bool/boolean $requireCert=false, string $alg='sha1', string/null $policy=null) : string the raw timestamp request
Generate a timestamp request (tsq) for a given hash
public static map() : void

This class extends \vakata\asn1\structures\Structure


Class: \vakata\asn1\structures\TimestampResponse

Visibility Function
public static map() : void
public static mapToken() : void

This class extends \vakata\asn1\structures\Structure