lib/signed-xml.js
function RSASHA512() {

  /**
  * Sign the given string using the given key
  *
  */
  this.getSignature = function(signedInfo, signingKey) {
    var signer = crypto.createSign("RSA-SHA512")
    signer.update(signedInfo)
    var res = signer.sign(signingKey, 'base64')
    return res
  }

  /**
  * Verify the given signature of the given string using key
  *
  */
  this.verifySignature = function(str, key, signatureValue) {
    var verifier = crypto.createVerify("RSA-SHA512")
    verifier.update(str)
    var res = verifier.verify(key, signatureValue, 'base64')
    return res
  }

  this.getAlgorithmName = function() {
    return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  }
}
function RSASHA512() {

  /**
  * Sign the given string using the given key
  *
  */
  this.getSignature = function(signedInfo, signingKey) {
    var signer = crypto.createSign("RSA-SHA512")
    signer.update(signedInfo)
    var res = signer.sign(signingKey, 'base64')
    return res
  }

  /**
  * Verify the given signature of the given string using key
  *
  */
  this.verifySignature = function(str, key, signatureValue) {
    var verifier = crypto.createVerify("RSA-SHA512")
    verifier.update(str)
    var res = verifier.verify(key, signatureValue, 'base64')
    return res
  }

  this.getAlgorithmName = function() {
    return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
  }
}
function RSASHA512 ( ) { /**
  * Sign the given string using the given key
  *
  */ this . getSignature = function ( signedInfo , signingKey ) { var signer = crypto . createSign ( "RSA-SHA512" ) signer . update ( signedInfo ) var res = signer . sign ( signingKey , 'base64' ) return res } /**
  * Verify the given signature of the given string using key
  *
  */ this . verifySignature = function ( str , key , signatureValue ) { var verifier = crypto . createVerify ( "RSA-SHA512" ) verifier . update ( str ) var res = verifier . verify ( key , signatureValue , 'base64' ) return res } this . getAlgorithmName = function ( ) { return "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512" } }
Signature algorithm implementation
Signature algorithm implementation