InfoCard/Xml/Security.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_InfoCard
- Subpackage
- Zend_InfoCard_Xml_Security
- Version
- $Id: Security.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_InfoCard_Xml_Security
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
CANONICAL_METHOD_C14N_EXC
= 'http://www.w3.org/2001/10/xml-exc-c14n#'
SIGNATURE_METHOD_SHA1
= 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'Methods

_encodeValue(string $data, \const $type) : stringEncode a limited set of data types into ASN.1 encoding format which is used in X.509 certificates
| Name | Type | Description |
|---|---|---|
| $data | string | The data to encode |
| $type | \const | The encoding format constant |
| Type | Description |
|---|---|
| string | The encoded value |
| Exception | Description |
|---|---|
| \Zend_InfoCard_Xml_Security_Exception |

_getPublicKeyFromModExp(string $modulus, string $exponent) : stringTransform an RSA Key in Modulus/Exponent format into a PEM encoding and return an openssl resource for it
| Name | Type | Description |
|---|---|---|
| $modulus | string | The RSA Modulus in binary format |
| $exponent | string | The RSA exponent in binary format |
| Type | Description |
|---|---|
| string | The PEM encoded version of the key |

_secureStringCompare(string $a, string $b) : boolSecurely compare two strings for equality while avoided C level memcmp() optimisations capable of leaking timing information useful to an attacker attempting to iteratively guess the unknown string (e.g.
password) being compared against.
| Name | Type | Description |
|---|---|---|
| $a | string | |
| $b | string |
| Type | Description |
|---|---|
| bool |

validateXMLSignature(string $strXMLInput) : boolValidates the signature of a provided XML block
| Name | Type | Description |
|---|---|---|
| $strXMLInput | string | An XML block containing a Signature |
| Type | Description |
|---|---|
| bool | True if the signature validated, false otherwise |
| Exception | Description |
|---|---|
| \Zend_InfoCard_Xml_Security_Exception |