public RequestSigner(AwsCredentials credentials = null, RequestSignerAlgorithm algorithm = RequestSignerAlgorithm.HmacSha1)
		{


			switch (algorithm)
			{
				case RequestSignerAlgorithm.HmacSha1:
					{
						_algorithm = new HMACSHA1();
						break;
					}

				case RequestSignerAlgorithm.HmacSha256:
					{
						_algorithm = new HMACSHA256();
						break;
					}

				default:
					{
						throw new ArgumentException("Invalid value : " + algorithm, "algorithm");
					}
			}


			Credentials = credentials;
			RequestSignerAlgorithm = algorithm;
		}
示例#2
0
        public RequestSigner(AwsCredentials credentials = null, RequestSignerAlgorithm algorithm = RequestSignerAlgorithm.HmacSha1)
        {
            switch (algorithm)
            {
            case RequestSignerAlgorithm.HmacSha1:
            {
                _algorithm = new HMACSHA1();
                break;
            }

            case RequestSignerAlgorithm.HmacSha256:
            {
                _algorithm = new HMACSHA256();
                break;
            }

            default:
            {
                throw new ArgumentException("Invalid value : " + algorithm, "algorithm");
            }
            }


            Credentials            = credentials;
            RequestSignerAlgorithm = algorithm;
        }
示例#3
0
 public static CommandProcessor Create(AwsCredentials credentials)
 {
     return(new CommandProcessor(new CommandRequestBuilder(new RequestSigner(credentials))));
 }