InfoCard/Xml/Security.php

Show: PublicProtectedPrivateinherited
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 24593 2012-01-05 20:35:02Z 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

>VConstant  ASN_TYPE_INTEGER = 2
ASN.1 type INTEGER class
>VConstant  ASN_TYPE_BITSTRING = 3
ASN.1 type BIT STRING class
>VConstant  ASN_TYPE_SEQUENCE = 48
ASN.1 type SEQUENCE class
>VConstant  CANONICAL_METHOD_C14N_EXC = 'http://www.w3.org/2001/10/xml-exc-c14n#'
The URI for Canonical Method C14N Exclusive
>VConstant  SIGNATURE_METHOD_SHA1 = 'http://www.w3.org/2000/09/xmldsig#rsa-sha1'
The URI for Signature Method SHA1
>VConstant  DIGEST_METHOD_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'
The URI for Digest Method SHA1
>VConstant  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
NameTypeDescription
$datastring

The data to encode

$type\const

The encoding format constant

Returns
TypeDescription
stringThe encoded value
Throws
ExceptionDescription
\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
NameTypeDescription
$modulusstring

The RSA Modulus in binary format

$exponentstring

The RSA exponent in binary format

Returns
TypeDescription
stringThe 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
NameTypeDescription
$astring
$bstring
Returns
TypeDescription
bool
methodpublicvalidateXMLSignature(string $strXMLInput) : bool
static

Validates the signature of a provided XML block

Parameters
NameTypeDescription
$strXMLInputstring

An XML block containing a Signature

Returns
TypeDescription
boolTrue if the signature validated, false otherwise
Throws
ExceptionDescription
\Zend_InfoCard_Xml_Security_Exception
Documentation was generated by phpDocumentor 2.0.0a12.