docs: function addSignatureHeaders(body, headers, keyId, private_key) {
    var sign = function(str, private_key) {
      var sign = Crypto.createSign('RSA-SHA256');
      sign.update(str);
      return sign.sign(private_key, 'base64');
    };
  
    var sha256 = function(str, encoding) {
      var bodyStr = JSON.stringify(str);
      var hash = Crypto.createHash('sha256');
      hash.update(bodyStr);
      return hash.digest(encoding);
    };
  
    if (!headers) {
      headers = {};
    }
  
    if (!headers.date) {
      headers.date = (new Date()).toUTCString();
    }
  
    if (!headers.digest) {
      headers.digest = 'SHA256=' + sha256(body, 'base64');
    }
  
  
    var combine = function(names, headers) {
      var parts = [];
      names.forEach(function(e) {
        parts.push(e + ': ' + headers[e]);
      });
      return parts.join('\n');
    };
  
    headers.authorization = 'Signature ' +
      'keyId="' + keyId + '", ' +
      'headers="date digest", ' +
      'algorithm="rsa-sha256", ' +
      'signature="' + sign(combine([ 'date', 'digest' ], headers), private_key) + '"';
  
    return headers;
  }