EldoS | Feel safer!

Software components for data protection, secure storage and transfer

help - from delphi to php

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 08/31/2016 18:18:39
by stelio pizzolatto (Premium support level)
Joined: 12/04/2015
Posts: 20

Hi every one

Have these two Delphi code lines copied from a example

Ref := TElXMLReference.Create();

The first line in PHP would be:

$Ref = new TElXMLReference(null);

The question is: how would the second line be in PHP?

Sorry fr the silly question
Posted: 09/01/2016 06:30:16
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us.

SecureBlackbox comes with XML_Sign demo php project that illustrates the use of TElXMLSigner component. This sample is a great place to start, as it might be of great help for you in your research and development processes. The sample can be found in <SecureBlackbox>\Samples\XMLBlackbox\Sign directory after you install SecureBlackbox on your computer.
The code from this demo:
// adding a reference for the whole document
$k = $xmlSigner->References->Add();
$ref = $xmlSigner->References->get_Reference($k);
$ref->DigestMethod = TElXMLDigestMethod::xdmSHA1;
$ref->URI = "";
$ref->URINode = $xmlDocument->DocumentElement;

Of course, you can translate above code (adding reference and enveloped signature transform) to use class constructors directly:
$ref = new TElXMLReference();
$transform = new TElXMLEnvelopedSignatureTransform();

// detachHandle() method "detach" wrapped object, so it won't be cleared when the php variable is freed. It needed only for those objects that added to the list/object that is responsible for their release (like References or TransformChain).
Posted: 09/01/2016 10:58:14
by stelio pizzolatto (Premium support level)
Joined: 12/04/2015
Posts: 20

Many thanks.. helped a lot



Topic viewed 278 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!