Пример #1
0
 public AccessTokenSignature(BasicSignature b, Keypair RequestResponseToken)
 {
     Timestamp = b.Timestamp;
     ConsumerKeypair = b.ConsumerKeypair;
     Nonce = b.Nonce;
     RequestResponseKeypair = RequestResponseToken;
     SignatureParameters = GetSigBaseStringParams();
     SignatureBaseString = GetSignatureBaseString();
     SigningKey = new SigningKey(ConsumerKeypair, SignatureBaseString);
     SignedSignature = Cryptography.GetSignature(SigningKey);
     RequestUri = AccessTokenApiUri + "?" + SignatureParameters + "&oauth_signature=" +
                  Uri.EscapeDataString(SignedSignature);
 }
Пример #2
0
 public BasicSignature(Keypair consumerKeypair)
 {
     ConsumerKeypair = consumerKeypair;
     Nonce = Cryptography.GetNonce();
     Timestamp = Cryptography.GetTimeStamp();
 }
Пример #3
0
 public GeneralGetSignature(BasicSignature b, Keypair UserAccessKeypair, string requestUri)
 {
     Timestamp = b.Timestamp;
     ConsumerKeypair = b.ConsumerKeypair;
     Nonce = b.Nonce;
     AccessKeypair = UserAccessKeypair;
     RequestUri = requestUri;
     SignatureParameters = GetSigBaseStringParams();
     SignatureBaseString = GetSignatureBaseString();
     SigningKey = new SigningKey(ConsumerKeypair, UserAccessKeypair, SignatureBaseString);
     SignedSignature = Cryptography.GetSignature(SigningKey);
 }