public static GetSignature ( OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret ) : string | ||
signatureMethod | OAuthSignatureMethod | The hashing method |
signatureTreatment | OAuthSignatureTreatment | The treatment to use on a signature value |
signatureBase | string | The signature base |
consumerSecret | string | The consumer key |
return | string |
/// <summary> /// Creates a signature value given a signature base and the consumer secret. /// This method is used when the token secret is currently unknown. /// </summary> /// <seealso href="http://oauth.net/core/1.0#rfc.section.9.2" /> /// <param name="signatureMethod">The hashing method</param> /// <param name="signatureBase">The signature base</param> /// <param name="consumerSecret">The consumer key</param> /// <returns></returns> public static string GetSignature( OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret) { return(OAuthTools.GetSignature(signatureMethod, OAuthSignatureTreatment.Escaped, signatureBase, consumerSecret, (string)null)); }
private string GetNewSignatureXAuth(WebParameterCollection parameters) { string timestamp = OAuthTools.GetTimestamp(); string nonce = OAuthTools.GetNonce(); this.AddXAuthParameters((ICollection <WebParameter>)parameters, timestamp, nonce); return(OAuthTools.GetSignature(this.SignatureMethod, this.SignatureTreatment, OAuthTools.ConcatenateRequestElements(this.Method.ToUpperInvariant(), this.RequestUrl, parameters), this.ConsumerSecret, this.TokenSecret)); }
private string GetNewSignature(WebParameterCollection parameters) { var timestamp = OAuthTools.GetTimestamp(); var nonce = OAuthTools.GetNonce(); AddAuthParameters(parameters, timestamp, nonce); var signatureBase = OAuthTools.ConcatenateRequestElements(Method.ToUpperInvariant(), RequestUrl, parameters); var signature = OAuthTools.GetSignature(SignatureMethod, SignatureTreatment, signatureBase, ConsumerSecret, TokenSecret); return(signature); }