SetaPDF_Signer_Pem Helper class for en- and decoding of PEM encoded data.

File: /SetaPDF v2/Signer/Pem.php

Class hierarchy

Summary

Static Methods

decode()

public static SetaPDF_Signer_Pem::decode (
string $data [, null &$label = null ]
): string

Decode PEM encoded data.

If no label is passed, the label of the first data package found is set. Otherwise the predefined label is used to find the first data package with that label.

Parameters
$data : string
 
$label : null

The label to match or the matched label if null.

encode()

public static SetaPDF_Signer_Pem::encode (
string $data, string $label
): string

Encodes data to PEM.

Parameters
$data : string
 
$label : string
 

extract()

public static SetaPDF_Signer_Pem::extract (
string $bundle [, null $label = null ]
): string[]

Extracts all PEM encoded strings from a bundle.

Parameters
$bundle : string
 
$label : null

Use the label to limit the result to only strings, with a specific label ("-----BEGIN $label-----").

extractFromFile()

public static SetaPDF_Signer_Pem::extractFromFile (
string $bundlePath [, null $label = null ]
): string[]

Extracts all PEM encoded strings from a file.

Parameters
$bundlePath : string
 
$label : null

Use the label to limit the result to only strings, with a specific label ("-----BEGIN $label-----").