class SignedXml

Class SignedXml

Constants

ENVELOPED

EXT_NS

Properties

protected string $privateKey Private key.
protected string $publicKey Public key.
protected string $keyAlgorithm Signature algorithm URI. By default RSA with SHA1.
protected string $digestAlgorithm Digest algorithm URI. By default SHA1.
protected string $canonicalMethod Canonical algorithm URI. By default C14N.

Methods

string
signXml(string $content)

Firma el contenido del xml y retorna el contenido firmado.

bool
verifyXml(string $content)

Verifica la firma del xml.

setCertificate(string $cert)

Set certificated in PEM format

setCertificateFromFile(string $filename)

No description

getPublicKey(DOMDocument $doc = null)

No description

sign(DOMDocument $data)

No description

string
signFromFile(string $filename)

Sign from file.

verify(DOMDocument $data)

No description

createXmlSecurityDSig()

Create the XMLSecurityDSig class.

bool
setPublicKeyFromNode(DOMDocument $doc)

Try to extract the public key from DOM node.

Details

at line 66
string signXml(string $content)

Firma el contenido del xml y retorna el contenido firmado.

Parameters

string $content

Return Value

string

at line 80
bool verifyXml(string $content)

Verifica la firma del xml.

Parameters

string $content

Return Value

bool

at line 92
setCertificate(string $cert)

Set certificated in PEM format

Parameters

string $cert

at line 101
setCertificateFromFile(string $filename)

Parameters

string $filename

at line 113
getPublicKey(DOMDocument $doc = null)

Parameters

DOMDocument $doc

at line 125
sign(DOMDocument $data)

Parameters

DOMDocument $data

at line 157
string signFromFile(string $filename)

Sign from file.

Parameters

string $filename

Return Value

string

at line 169
verify(DOMDocument $data)

Parameters

DOMDocument $data

at line 223
protected XMLSecurityDSig createXmlSecurityDSig()

Create the XMLSecurityDSig class.

Return Value

XMLSecurityDSig

at line 241
protected bool setPublicKeyFromNode(DOMDocument $doc)

Try to extract the public key from DOM node.

Sets publicKey and keyAlgorithm properties if success.

Parameters

DOMDocument $doc

Return Value

bool <code>true</code> If public key was extracted or <code>false</code> if cannot be possible

Exceptions

Exception

See also