code: function sign (method, input, consumerSecret, tokenSecret) {
    var encoding = 'base64'
    var result = ''
    var key = encodeOAuthData(consumerSecret) + '&' +
      encodeOAuthData(tokenSecret)
  
    switch (method) {
      case 'PLAINTEXT':
        result = key
        break
  
      case 'RSA-SHA1':
        result = crypto.createSign(method).update(input).sign(key, encoding)
        break
  
      case 'HMAC-SHA1':
        result = crypto.createHmac('sha1', key).update(input).digest(encoding)
        break
  
      default:
      // ERROR
    }
  
    return result
  }
docs: Signature