utils/utils.js
function signMsg(msg, key, alg) {
  var signer = crypto.createSign(alg);
  signer.update(msg);
  return signer.sign(key);
}
function signMsg(msg, key, alg) {
  var signer = crypto.createSign(alg);
  signer.update(msg);
  return signer.sign(key);
}
function signMsg ( msg , key , alg ) { var signer = crypto . createSign ( alg ) ; signer . update ( msg ) ; return signer . sign ( key ) ; }
sign msg with the given key and alg
sign msg with the given key and alg