1 /*
2  * @(#) $Id: CreateSignature.java,v 1.2 2003/07/08 08:13:52 pankaj Exp $
3  *
4  * Copyright (c) 2002-03 by Pankaj Kumar (http://www.pankaj-k.net). 
5  * All rights reserved.
6  *
7  * The license governing the use of this file can be found in the 
8  * root directory of the containing software.
9  */
10import infomosaic.securexml.Signature;
11
12public class CreateSignature{
13    public static void main(String[] unused){
14        String outfile = "sig.xml";
15        Signature sig = new Signature();
16        sig.selectActiveCertificate();
17        String fileData = sig.readAll("book.tmpl");
18        String outFileData = sig.signXMLStr(fileData, "Sig");
19        sig.saveXMLStr(outFileData, outfile);
20
21        System.out.println("Signed XMl document saved in file: " + outfile);
22    }
23}
24