API Documentation

Zend/InfoCard/Xml/Security.php

Show: inherited
Table of Contents

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-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 24594 2012-01-05 21:27:01Z matthew $  

\Zend_InfoCard_Xml_Security

Package: Zend\InfoCard\Zend\InfoCard\Xml\Security

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

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