Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • File_ASN1
  • File_ASN1_Element

Class File_ASN1

Pure-PHP ASN.1 Parser

Package: File\ASN1
Copyright: MMXII Jim Wigginton
License: MIT License
Author: Jim Wigginton <terrafrost@php.net>
Version: 0.3.0
Located at vendors/phpseclib/File/ASN1.php

Methods summary

public Array
# decodeBER( String $encoded )

Parse BER-encoding

Parse BER-encoding

Serves a similar purpose to openssl's asn1parse

Parameters

$encoded
String
$encoded

Returns

Array
public Array
# _decode_ber( String & $encoded, Integer $start = 0 )

Parse BER-encoding (Helper function)

Parse BER-encoding (Helper function)

Sometimes we want to get the BER encoding of a particular tag. $start lets us do that without having to reencode. $encoded is passed by reference for the recursive calls done for FILE_ASN1_TYPE_BIT_STRING and FILE_ASN1_TYPE_OCTET_STRING. In those cases, the indefinite length is used.

Parameters

$encoded
String
$encoded
$start
Integer
$start

Returns

Array
public Array
# asn1map( String $decoded, Integer $mapping, mixed $idx = NULL )

ASN.1 Decode

ASN.1 Decode

Provides an ASN.1 semantic mapping ($mapping) from a parsed BER-encoding to a human readable format.

Parameters

$decoded
String
$encoded
$mapping
Integer
$start
$idx

Returns

Array
public String
# encodeDER( String $source, String $mapping )

ASN.1 Encode

ASN.1 Encode

DER-encodes an ASN.1 semantic mapping ($mapping). Some libraries would probably call this function an ASN.1 compiler.

Parameters

$source
String
$source
$mapping
String
$mapping

Returns

String
public String
# _encode_der( String $source, String $mapping, Integer $idx = NULL )

ASN.1 Encode (Helper function)

ASN.1 Encode (Helper function)

Parameters

$source
String
$source
$mapping
String
$mapping
$idx
Integer
$idx

Returns

String
public String
# _encodeLength( Integer $length )

DER-encode the length

DER-encode the length

DER supports lengths up to (28)127, however, we'll only support lengths up to (28)4. See X.690 ยง 8.1.3 for more information.

Parameters

$length
Integer
$length

Returns

String
public String
# _decodeTime( String $content, Integer $tag )

BER-decode the time

BER-decode the time

Called by _decode_ber() and in the case of implicit tags asn1map().

Parameters

$content
String
$content
$tag
Integer
$tag

Returns

String
public
# setTimeFormat( String $format )

Set the time format

Set the time format

Sets the time / date format for asn1map().

Parameters

$format
String
$format
public
# loadOIDs( Array $oids )

Load OIDs

Load OIDs

Load the relevant OIDs for a particular ASN.1 semantic mapping.

Parameters

$oids
Array
$oids
public
# loadFilters( Array $filters )

Load filters

Load filters

See File_X509, etc, for an example.

Parameters

$filters
Array
$filters
public String
# _string_shift( String & $string, optional $index = 1 )

String Shift

String Shift

Inspired by array_shift

Parameters

$string
String
$string
$index
optional
Integer $index

Returns

String

Magic methods summary

Properties summary

public Array $oids
#

ASN.1 object identifier

ASN.1 object identifier

Link

http://en.wikipedia.org/wiki/Object_identifier
public Array $format
#

Default date format

Default date format

Link

http://php.net/class.datetime
public Array $encoded
#

Default date format

Default date format

See

File_ASN1::setTimeFormat()
File_ASN1::asn1map()

Link

http://php.net/class.datetime
public Array $filters
#

Filters

Filters

If the mapping type is FILE_ASN1_TYPE_ANY what do we actually encode it as?

See

File_ASN1::_encode_der()
Blesta API documentation generated by ApiGen 2.8.0