How to use the xml-encryption.encryptKeyInfo function in xml-encryption

To help you get started, we’ve selected a few xml-encryption examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github auth0 / node-saml / lib / saml11.js View on Github external
function addSubjectConfirmation(options, doc, randomBytes, callback) {
  var encryptOptions = {
    rsa_pub: options.encryptionPublicKey,
    pem: options.encryptionCert,
    keyEncryptionAlgorighm: options.keyEncryptionAlgorighm || 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p'
  };

  xmlenc.encryptKeyInfo(randomBytes, encryptOptions, function(err, keyinfo) { 
    if (err) return cb(err);
    var subjectConfirmationNodes = doc.documentElement.getElementsByTagNameNS(NAMESPACE, 'SubjectConfirmation');

    for (var i=0; i

xml-encryption

[![Build Status](https://travis-ci.org/auth0/node-xml-encryption.png)](https://travis-ci.org/auth0/node-xml-encryption)

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis