Пример #1
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;
		}
Пример #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))));
 }