◆ asn1map()
static asn1map |
( |
|
$decoded, |
|
|
|
$mapping, |
|
|
|
$special = [] |
|
) |
| |
|
static |
ASN.1 Map
Provides an ASN.1 semantic mapping ($mapping) from a parsed BER-encoding to a human readable format.
"Special" mappings may be applied on a per tag-name basis via $special.
- Paramètres
-
array | $decoded | |
array | $mapping | |
array | $special | |
- Renvoie
- array|bool|Element|string|null public
Références $content, $format, $i, $key, $n, Joomla\Database\Query\$offset, $option, $size, $temp, $value, elseif, et null.
Référencé par X509\computeKeyIdentifier(), PKCS8\extractEncryptionAlgorithm(), X509\formatSubjectPublicKey(), EC\getCurve(), X509\getDNProp(), PKCS1\load(), PSS\load(), PKCS8\load(), X509\loadCRL(), X509\loadCSR(), phpseclib3\Crypt\EC\Formats\Keys\loadCurveByParam(), X509\loadSPKAC(), X509\loadX509(), X509\mapInAttributes(), X509\mapInDNs(), X509\mapInExtensions(), X509\mapOutAttributes(), et PublicKey\rsassa_pkcs1_v1_5_relaxed_verify().
◆ convert()
static convert |
( |
|
$in, |
|
|
|
$from = self::TYPE_UTF8_STRING , |
|
|
|
$to = self::TYPE_UTF8_STRING |
|
) |
| |
|
static |
String type conversion
This is a lazy conversion, dealing only with character size. No real conversion table is used.
- Paramètres
-
string | $in | |
int | $from | |
int | $to | |
- Renvoie
- string public
Références $c, et $i.
Référencé par X509\getDN(), et X509\getDNProp().
◆ decodeBER()
static decodeBER |
( |
|
$encoded | ) |
|
|
static |
Parse BER-encoding
Serves a similar purpose to openssl's asn1parse
- Paramètres
-
- Renvoie
- array public
Références ASN1\$encoded.
Référencé par X509\computeKeyIdentifier(), PKCS8\extractEncryptionAlgorithm(), X509\formatSubjectPublicKey(), EC\getCurve(), X509\getDNProp(), PKCS1\load(), PSS\load(), PKCS8\load(), X509\loadCRL(), X509\loadCSR(), phpseclib3\Crypt\EC\Formats\Keys\loadCurveByParam(), X509\loadSPKAC(), X509\loadX509(), X509\mapInAttributes(), X509\mapInDNs(), X509\mapInExtensions(), X509\mapOutAttributes(), PKCS8\preParse(), et PublicKey\rsassa_pkcs1_v1_5_relaxed_verify().
◆ decodeLength()
static decodeLength |
( |
& |
$string | ) |
|
|
static |
DER-decode the length
DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See X.690 paragraph 8.1.3 for more information.
public
- Paramètres
-
- Renvoie
- int
Références $temp, et Strings\shift().
◆ decodeOID()
static decodeOID |
( |
|
$content | ) |
|
|
static |
BER-decode the OID
Called by _decode_ber()
public
- Paramètres
-
- Renvoie
- string
Références $content, $n, $oid, et $temp.
◆ decodeTime()
static decodeTime |
( |
|
$content, |
|
|
|
$tag |
|
) |
| |
|
staticprivate |
◆ encode_der()
static encode_der |
( |
|
$source, |
|
|
|
$mapping, |
|
|
|
$idx = null , |
|
|
|
$special = [] |
|
) |
| |
|
staticprivate |
ASN.1 Encode (Helper function)
- Paramètres
-
Element | string | array | null | $source | |
array | $mapping | |
int | $idx | |
array | $special | |
- Renvoie
- string private
Références $content, $date, $filters, ASN1\$filters, ASN1\$format, $i, $key, $location, Joomla\Database\Query\$offset, $size, $temp, $value, et null.
◆ encodeDER()
static encodeDER |
( |
|
$source, |
|
|
|
$mapping, |
|
|
|
$special = [] |
|
) |
| |
|
static |
ASN.1 Encode
DER-encodes an ASN.1 semantic mapping ($mapping). Some libraries would probably call this function an ASN.1 compiler.
"Special" mappings can be applied via $special.
- Paramètres
-
Element | string | array | $source | |
array | $mapping | |
array | $special | |
- Renvoie
- string public
Références $location, et null.
Référencé par phpseclib3\Crypt\EC\Formats\Keys\encodeParameters(), X509\getDN(), X509\loadCSR(), X509\loadSPKAC(), X509\loadX509(), X509\mapInAttributes(), X509\mapOutAttributes(), X509\mapOutDNs(), X509\mapOutExtensions(), X509\saveCRL(), X509\saveCSR(), PKCS1\saveParameters(), PKCS1\savePrivateKey(), PKCS8\savePrivateKey(), PSS\savePSSParams(), PKCS1\savePublicKey(), PKCS8\savePublicKey(), X509\saveSPKAC(), X509\saveX509(), PKCS8\wrapPrivateKey(), et PKCS8\wrapPublicKey().
◆ encodeLength()
static encodeLength |
( |
|
$length | ) |
|
|
static |
DER-encode the length
DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See X.690 paragraph 8.1.3 for more information.
public
- Paramètres
-
- Renvoie
- string
Références $temp.
Référencé par X509\setEndDate().
◆ encodeOID()
static encodeOID |
( |
|
$source | ) |
|
|
static |
DER-encode the OID
Called by _encode_der()
public
- Paramètres
-
- Renvoie
- string
Références $oid, $parts, $temp, et $value.
◆ extractBER()
static extractBER |
( |
|
$str | ) |
|
|
static |
Extract raw BER from Base64 encoding
private
- Paramètres
-
- Renvoie
- string
Références $temp, et EncoderInterface\decode().
Référencé par X509\computeKeyIdentifier(), EC\getCurve(), PKCS1\load(), X509\loadCRL(), X509\loadCSR(), X509\loadX509(), PKCS8\preParse(), PKCS8\savePrivateKey(), PSS\savePrivateKey(), PKCS8\savePublicKey(), et PSS\savePublicKey().
◆ getOID()
Returns the OID corresponding to a name
What's returned in the associative array returned by loadX509() (or load*()) is either a name or an OID if no OID to name mapping is available. The problem with this is that what may be an unmapped OID in one version of phpseclib may not be unmapped in the next version, so apps that are looking at this OID may not be able to work from version to version.
This method will return the OID if a name is passed to it and if no mapping is avialable it'll assume that what's being passed to it already is an OID and return that instead. A few examples.
getOID('2.16.840.1.101.3.4.2.1') == '2.16.840.1.101.3.4.2.1' getOID('id-sha256') == '2.16.840.1.101.3.4.2.1' getOID('zzz') == 'zzz'
public
- Paramètres
-
- Renvoie
- string
Références $name.
◆ loadOIDs()
◆ setFilters()
static setFilters |
( |
|
$filters | ) |
|
|
static |
◆ setTimeFormat()
static setTimeFormat |
( |
|
$format | ) |
|
|
static |
◆ $encoded
◆ $filters
◆ $format
$format = 'D, d M Y H:i:s O' |
|
staticprivate |
◆ $location
◆ $oids
◆ $reverseOIDs
◆ ANY_MAP
◆ CLASS_APPLICATION
const CLASS_APPLICATION = 1 |
◆ CLASS_CONTEXT_SPECIFIC
const CLASS_CONTEXT_SPECIFIC = 2 |
◆ CLASS_PRIVATE
◆ CLASS_UNIVERSAL
const CLASS_UNIVERSAL = 0 |
◆ STRING_TYPE_SIZE
◆ TYPE_ANY
◆ TYPE_BIT_STRING
const TYPE_BIT_STRING = 3 |
◆ TYPE_BMP_STRING
const TYPE_BMP_STRING = 30 |
◆ TYPE_BOOLEAN
◆ TYPE_CHOICE
◆ TYPE_ENUMERATED
const TYPE_ENUMERATED = 10 |
◆ TYPE_GENERAL_STRING
const TYPE_GENERAL_STRING = 27 |
◆ TYPE_GENERALIZED_TIME
const TYPE_GENERALIZED_TIME = 24 |
◆ TYPE_GRAPHIC_STRING
const TYPE_GRAPHIC_STRING = 25 |
◆ TYPE_IA5_STRING
const TYPE_IA5_STRING = 22 |
◆ TYPE_INTEGER
◆ TYPE_NULL
◆ TYPE_NUMERIC_STRING
const TYPE_NUMERIC_STRING = 18 |
◆ TYPE_OBJECT_IDENTIFIER
const TYPE_OBJECT_IDENTIFIER = 6 |
◆ TYPE_OCTET_STRING
const TYPE_OCTET_STRING = 4 |
◆ TYPE_PRINTABLE_STRING
const TYPE_PRINTABLE_STRING = 19 |
◆ TYPE_REAL
◆ TYPE_SEQUENCE
◆ TYPE_SET
◆ TYPE_TELETEX_STRING
const TYPE_TELETEX_STRING = 20 |
◆ TYPE_UNIVERSAL_STRING
const TYPE_UNIVERSAL_STRING = 28 |
◆ TYPE_UTC_TIME
◆ TYPE_UTF8_STRING
const TYPE_UTF8_STRING = 12 |
◆ TYPE_VIDEOTEX_STRING
const TYPE_VIDEOTEX_STRING = 21 |
◆ TYPE_VISIBLE_STRING
const TYPE_VISIBLE_STRING = 26 |
La documentation de cette classe a été générée à partir du fichier suivant :