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;
		}
Esempio n. 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;
        }