PHP code example of vakata / asn1
1. Go to this page and download the library: Download vakata/asn1 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vakata / asn1 example snippets
// first create an instance (there is a fromFile static method as well)
$decoded = \vakata\asn1\Decoder::fromString("...ASN1 data here ...");
// you can then inspect the parsed raw data
$decoded->structure(); // more info
$decoded->values(); // just values
// or map the data to an existing map
$decoded->map($mapArray);
// the encoder on the otherhand needs some data and a map
\vakata\asn1\Encoder::encode($dataArray, $mapArray);