[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/ -> XML.php (summary)

XML Formatted EC Key Handler More info:

Author: Jim Wigginton
Copyright: 2015 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 485 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  load()
  query()
  isolateNamespace()
  decodeValue()
  extractPointRFC4050()
  loadCurveByParam()
  loadCurveByParamRFC4050()
  setNamespace()
  enableRFC4050Syntax()
  disableRFC4050Syntax()
  savePublicKey()
  encodeXMLParameters()

Functions
Functions that are not part of a class:

load($key, $password = '')   X-Ref
Break a public or private key down into its constituent components

return: array
param: string $key
param: string $password optional

query(\DOMXPath $xpath, $name, $error = null, $decode = true)   X-Ref
Case-insensitive xpath query

return: \DOMNodeList
param: \DOMXPath $xpath
param: string $name
param: string $error optional
param: bool $decode optional

isolateNamespace($xml, $ns)   X-Ref
Finds the first element in the relevant namespace, strips the namespacing and returns the XML for that element.

param: string $xml
param: string $ns

decodeValue($value)   X-Ref
Decodes the value

param: string $value

extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve)   X-Ref
Extract points from an XML document

return: object[]
param: \DOMXPath $xpath
param: \phpseclib3\Crypt\EC\BaseCurves\Base $curve

loadCurveByParam(\DOMXPath $xpath)   X-Ref
Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based
on the curve parameters

return: \phpseclib3\Crypt\EC\BaseCurves\Base|false
param: \DomXPath $xpath

loadCurveByParamRFC4050(\DOMXPath $xpath)   X-Ref
Returns an instance of \phpseclib3\Crypt\EC\BaseCurves\Base based
on the curve parameters

return: \phpseclib3\Crypt\EC\BaseCurves\Base|false
param: \DomXPath $xpath

setNamespace($namespace)   X-Ref
Sets the namespace. dsig11 is the most common one.

Set to null to unset. Used only for creating public keys.

param: string $namespace

enableRFC4050Syntax()   X-Ref
Uses the XML syntax specified in https://tools.ietf.org/html/rfc4050


disableRFC4050Syntax()   X-Ref
Uses the XML syntax specified in https://www.w3.org/TR/xmldsig-core/#sec-ECParameters


savePublicKey(BaseCurve $curve, array $publicKey, array $options = [])   X-Ref
Convert a public key to the appropriate format

return: string
param: \phpseclib3\Crypt\EC\BaseCurves\Base $curve
param: \phpseclib3\Math\Common\FiniteField\Integer[] $publicKey
param: array $options optional

encodeXMLParameters(BaseCurve $curve, $pre, array $options = [])   X-Ref
Encode Parameters

return: string|false
param: \phpseclib3\Crypt\EC\BaseCurves\Base $curve
param: string $pre
param: array $options optional