title: Is there any documentation for xmlseclibs?
body: <p>I have signed the XML but I don't know how to include KeyValue element in the signature. Having some documentation would save a lot of time.</p>
  
  <p>The code below (if you are interested) is what I managed to do with xmlseclibs so far:</p>
  
  <pre><code>&lt;?php
  require('xmlseclibs.php'); 
  </code></pre>
  
  <p>XML string</p>
  
  <pre><code>$getToken = '&lt;getToken&gt;
  &lt;item&gt;
  &lt;Semilla&gt;Random string&lt;/Semilla&gt;
  &lt;/item&gt;
  &lt;/getToken&gt;';
  </code></pre>
  
  <p>Creating XML object (to sign)</p>
  
  <pre><code>$getToken_DOMDocument = new DOMDocument(); 
  $getToken_DOMDocument -&gt; loadXml($getToken); 
  </code></pre>
  
  <p>Creating the signature object with xmlseclibs</p>
  
  <pre><code>$getToken_XMLSecurityDSig = new XMLSecurityDSig(); 
  $getToken_XMLSecurityDSig -&gt; setCanonicalMethod(XMLSecurityDSig::C14N); 
  </code></pre>
  
  <p>Trying to turn off the ds: prefix which didn't work</p>
  
  <pre><code>$options['prefix'] = '';
  $options['prefix_ns'] = '';
  $options['force_uri'] = TRUE;
  $options['id_name'] = 'ID';
  
  $getToken_XMLSecurityDSig -&gt; addReference($getToken_DOMDocument, XMLSecurityDSig::SHA1, array('http://www.w3.org/2000/09/xmldsig#enveloped-signature', 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'), $options); 
  </code></pre>
  
  <p>Accessing the necessary key data</p>
  
  <pre><code>$XMLSecurityKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type'=&gt;'private')); 
  $XMLSecurityKey -&gt; loadKey('../../DTE/certificado/firma/certificado.pem', TRUE); 
  /* if key has Passphrase, set it using $objKey -&gt; passphrase = &lt;passphrase&gt; */ 
  </code></pre>
  
  <p>Signing the XML object</p>
  
  <pre><code>$getToken_XMLSecurityDSig -&gt; sign($XMLSecurityKey); 
  </code></pre>
  
  <p>Adding the public key</p>
  
  <pre><code>$getToken_XMLSecurityDSig -&gt; add509Cert(file_get_contents('../../DTE/certificado/firma/certificado.pem')); 
  </code></pre>
  
  <p>Appending the enveloped signature to the XML object </p>
  
  <pre><code>$getToken_XMLSecurityDSig -&gt; appendSignature($getToken_DOMDocument -&gt; documentElement); 
  </code></pre>
  
  <p>Saving the signed XML code toa  file</p>
  
  <pre><code>$getToken_DOMDocument -&gt; save('sign-basic-test.xml'); 
  ?&gt;
  </code></pre>
  
  <p>Additionaly would also like from this library:</p>
  
  <ol>
  <li>Know official and trustable repository to ensure the library is not corrupted.</li>
  <li>Turning off the "ds:" prefix (because nor the example nor the documentation of the XML I am producing includes such prefix).</li>
  <li>Linebreaks every X characters in the Base64 type values.</li>
  <li>Full indentation (otherwise none at all).</li>
  </ol>
  
  <p>I got the library from <a href="https://code.google.com/p/xmlseclibs/" rel="nofollow">enter link description here</a></p>
  
  <p>Thanks in advance.</p>