API Documentation

InfoCard/Xml/Security.php

Zend Framework

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_InfoCard  
subpackage
Zend_InfoCard_Xml_Security  
version
$Id: Security.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_InfoCard_Xml_Security

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_InfoCard  
subpackage
Zend_InfoCard_Xml_Security  

Constants

Constant  ASN_TYPE_INTEGER = '0x02'

ASN.1 type INTEGER class

Constant  ASN_TYPE_BITSTRING = '0x03'

ASN.1 type BIT STRING class

Constant  ASN_TYPE_SEQUENCE = '0x30'

ASN.1 type SEQUENCE class

Constant  CANONICAL_METHOD_C14N_EXC = 'http://www.w3.org/2001/10/xml-exc-c14n#'

The URI for Canonical Method C14N Exclusive

Constant  SIGNATURE_METHOD_SHA1 = 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'

The URI for Signature Method SHA1

Constant  DIGEST_METHOD_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'

The URI for Digest Method SHA1

Constant  RSA_KEY_IDENTIFIER = '300D06092A864886F70D0101010500'

The Identifier for RSA Keys

Methods

methodprivate__construct( ) : void

Constructor (disabled)

methodprotected_encodeValue( string $data, \const $type ) : string
static

Encode a limited set of data types into ASN.1 encoding format which is used in X.509 certificates

Parameters
Name Type Description
$data string The data to encode
$type \const The encoding format constant
Returns
Type Description
string The encoded value
Throws
Exception Description
\Zend_InfoCard_Xml_Security_Exception
methodprotected_getPublicKeyFromModExp( string $modulus, string $exponent ) : string
static

Transform an RSA Key in Modulus/Exponent format into a PEM encoding and return an openssl resource for it

Parameters
Name Type Description
$modulus string The RSA Modulus in binary format
$exponent string The RSA exponent in binary format
Returns
Type Description
string The PEM encoded version of the key
methodprotected_secureStringCompare( string $a, string $b ) : bool
static

Securely 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.

Parameters
Name Type Description
$a string
$b string
Returns
Type Description
bool
methodpublicvalidateXMLSignature( string $strXMLInput ) : bool
static

Validates the signature of a provided XML block

Parameters
Name Type Description
$strXMLInput string An XML block containing a Signature
Returns
Type Description
bool True if the signature validated, false otherwise
Throws
Exception Description
\Zend_InfoCard_Xml_Security_Exception
Documentation was generated by DocBlox 0.13.3.