EldoS | Feel safer!

Software components for data protection, secure storage and transfer

sign files with XML sign

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.
#9163
Posted: 03/06/2009 03:26:43
by felix Gonzalez (Standard support level)
Joined: 03/06/2009
Posts: 7

Hi

It´s posible to sing any file (pdf, jpj...) using XML sign Xades?

thanks
#9164
Posted: 03/06/2009 04:32:23
by Eugene Mayevski (EldoS Corp.)

Yes, it's possible. You can sign them as a binary data block or as an external entity (referenced by URL).


Sincerely yours
Eugene Mayevski
#16185
Posted: 04/05/2011 14:14:13
by Grazyna Polomska (Basic support level)
Joined: 02/07/2011
Posts: 9

Does it mean that I can do sth like this:
ref.URIStream := DocToSign;
where ref := TelXMLReference.Create(); and DocToSign: TMemoryStream;
Am I right?

If I set
Signer.SignatureType := xstDetached;
and want to include binary base64 encoded document like in attachment (MimeType := 'image/jpeg')

what is correct way to do that?


For an xml document I've got this:
obj := TelXmlObject.Create;
obj.MimeType := 'text/xml';
obj.ID := 'Dokument-0';
obj.DataList.Add(FXMLDocument.DocumentElement.CloneNode(true));
Signer.Signature.Objects.Add(obj);

But what about binary file?


[ Download ]
#16187
Posted: 04/05/2011 18:15:11
by Dmytro Bogatskyy (EldoS Corp.)

Quote
Does it mean that I can do sth like this:
ref.URIStream := DocToSign;
where ref := TelXMLReference.Create(); and DocToSign: TMemoryStream;
Am I right?

Yes, that's right. You also may need URIStreamOffset and URIStreamCount properties to specify part of the stream. Only, you should free TMemoryStream/TFileStreeam by yourself after it is not used.
Quote
and want to include binary base64 encoded document like in attachment (MimeType := 'image/jpeg')

You can load data to buffer, and then create new text node that contains a data:
Code
obj.DataList.Add(FXMLDocument.CreateTextNode(ConvertToBase64String(Buffer)));

Reply

Statistics

Topic viewed 2540 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!