Property | Type | Description | |
---|---|---|---|
TerminatorBytes | byte[] |
Method | Description | |
---|---|---|
ComposeSigningKey ( string awsSecretAccessKey, string region, string date, string service ) : byte[] |
Compute and return the multi-stage signing key for the request.
|
|
ComputeHash ( byte data ) : byte[] |
Computes the non-keyed hash of the supplied data
|
|
ComputeHash ( string data ) : byte[] |
Computes the non-keyed hash of the supplied data
|
|
ComputeKeyedHash ( SigningAlgorithm algorithm, byte key, byte data ) : byte[] |
Compute and return the hash of a data blob using the specified key
|
|
ComputeKeyedHash ( SigningAlgorithm algorithm, byte key, string data ) : byte[] |
Compute and return the hash of a data blob using the specified key
|
|
ComputeSignature ( |
Computes and returns an AWS4 signature for the specified canonicalized request
|
|
ComputeSignature ( string awsAccessKey, string awsSecretAccessKey, string region, System.DateTime signedAt, string service, string signedHeaders, string canonicalRequest ) : |
Computes and returns an AWS4 signature for the specified canonicalized request
|
|
ComputeSignature ( string awsAccessKey, string awsSecretAccessKey, string region, System.DateTime signedAt, string service, string signedHeaders, string canonicalRequest, |
Computes and returns an AWS4 signature for the specified canonicalized request
|
|
DetermineSigningRegion ( IClientConfig clientConfig, string serviceName, RegionEndpoint alternateEndpoint, IRequest request ) : string | ||
FormatDateTime ( System.DateTime dt, string formatString ) : string |
Formats the supplied date and time for use in AWS4 signing, where various formats are used.
|
|
InitializeHeaders ( string>.IDictionary |
Sets the AWS4 mandated 'host' and 'x-amz-date' headers, returning the date/time that will be used throughout the signing process in various elements and formats.
|
|
InitializeHeaders ( string>.IDictionary |
Sets the AWS4 mandated 'host' and 'x-amz-date' headers, accepting and returning the date/time that will be used throughout the signing process in various elements and formats.
|
|
SetRequestBodyHash ( IRequest request ) : string |
If the caller has already set the x-amz-content-sha256 header with a pre-computed content hash, or it is present as ContentStreamHash on the request instance, return the value to be used in request canonicalization. If not set as a header or in the request, attempt to compute a hash based on inspection of the style of the request content.
|
|
Sign ( IRequest request, IClientConfig clientConfig, |
Calculates and signs the specified request using the AWS4 signing protocol by using the AWS account credentials given in the method parameters. The resulting signature is added to the request headers as 'Authorization'. Parameters supplied in the request, either in the resource path as a query string or in the Parameters collection must not have been uri encoded. If they have, use the SignRequest method to obtain a signature.
|
|
SignBlob ( byte key, byte data ) : byte[] |
Returns the HMAC256 for an arbitrary blob using the specified key
|
|
SignBlob ( byte key, string data ) : byte[] |
Returns the HMAC256 for an arbitrary blob using the specified key
|
|
SignRequest ( IRequest request, IClientConfig clientConfig, |
Calculates and signs the specified request using the AWS4 signing protocol by using the AWS account credentials given in the method parameters. Parameters passed as part of the resource path should be uri-encoded prior to entry to the signer. Parameters passed in the request.Parameters collection should be not be encoded; encoding will be done for these parameters as part of the construction of the canonical request. |
Method | Description | |
---|---|---|
CanonicalizeHeaderNames ( string>.IEnumerable |
Returns the set of headers included in the signature as a flattened, ;-delimited string
|
|
CanonicalizeHeaders ( string>.IEnumerable |
Computes the canonical headers with values for the request. Only headers included in the signature are included in the canonicalization process.
|
|
CanonicalizeQueryParameters ( string>.IDictionary |
||
CanonicalizeQueryParameters ( string>.IDictionary |
Computes and returns the canonicalized query string, if query parameters have been supplied. Parameters with no value will be canonicalized as 'param='. The expectation is that parameters have not already been url encoded prior to canonicalization.
|
|
CanonicalizeQueryParameters ( string queryString ) : string | ||
CanonicalizeQueryParameters ( string queryString, bool uriEncodeParameters ) : string |
Computes and returns the canonicalized query string, if query parameters have been supplied. Parameters with no value will be canonicalized as 'param='. The expectation is that parameters have not already been url encoded prior to canonicalization.
|
|
CanonicalizeRequest ( |
Computes and returns the canonical request
|
|
GetParametersToCanonicalize ( IRequest request ) : string>.IDictionary |
Collects the subresource and query string parameters into one collection ready for canonicalization
|
|
SortAndPruneHeaders ( string>.IEnumerable |
Reorders the headers for the request for canonicalization. For AWS4 signing, all headers are considered viable for inclusion |
Method | Description | |
---|---|---|
CleanHeaders ( string>.IDictionary |
||
CompressSpaces ( string data ) : string | ||
DetermineService ( IClientConfig clientConfig ) : string | ||
GetRequestPayloadBytes ( IRequest request ) : byte[] |
Returns the request parameters in the form of a query string.
|
protected static CanonicalizeHeaderNames ( string>.IEnumerable |
||
sortedHeaders | string>.IEnumerable | The headers included in the signature |
return | string |
protected static CanonicalizeHeaders ( string>.IEnumerable |
||
sortedHeaders | string>.IEnumerable | All request headers, sorted into canonical order |
return | string |
protected static CanonicalizeQueryParameters ( string>.IDictionary |
||
parameters | string>.IDictionary | |
return | string |
protected static CanonicalizeQueryParameters ( string>.IDictionary |
||
parameters | string>.IDictionary | The set of parameters to be encoded in the query string |
uriEncodeParameters | bool | /// Parameters must be uri encoded into the canonical request and by default the signer expects /// that the supplied collection contains non-encoded data. Set this to false if the encoding was /// done prior to signer entry. /// |
return | string |
protected static CanonicalizeQueryParameters ( string queryString ) : string | ||
queryString | string | |
return | string |
protected static CanonicalizeQueryParameters ( string queryString, bool uriEncodeParameters ) : string | ||
queryString | string | The set of parameters being passed on the uri |
uriEncodeParameters | bool | /// Parameters must be uri encoded into the canonical request and by default the signer expects /// that the supplied collection contains non-encoded data. Set this to false if the encoding was /// done prior to signer entry. /// |
return | string |
protected static CanonicalizeRequest ( |
||
endpoint | The endpoint URL | |
resourcePath | string | the path of the resource being operated on |
httpMethod | string | The http method used for the request |
sortedHeaders | string>.IDictionary | The full request headers, sorted into canonical order |
canonicalQueryString | string | The query parameters for the request |
precomputedBodyHash | string | /// The hash of the binary request body if present. If not supplied, the routine /// will look for the hash as a header on the request. /// |
return | string |
public static ComposeSigningKey ( string awsSecretAccessKey, string region, string date, string service ) : byte[] | ||
awsSecretAccessKey | string | The clear-text AWS secret key, if not held in secureKey |
region | string | The region in which the service request will be processed |
date | string | Date of the request, in yyyyMMdd format |
service | string | The name of the service being called by the request |
return | byte[] |
public static ComputeHash ( byte data ) : byte[] | ||
data | byte | |
return | byte[] |
public static ComputeHash ( string data ) : byte[] | ||
data | string | |
return | byte[] |
public static ComputeKeyedHash ( SigningAlgorithm algorithm, byte key, byte data ) : byte[] | ||
algorithm | SigningAlgorithm | Algorithm to use for hashing |
key | byte | Hash key |
data | byte | Data blob |
return | byte[] |
public static ComputeKeyedHash ( SigningAlgorithm algorithm, byte key, string data ) : byte[] | ||
algorithm | SigningAlgorithm | Algorithm to use for hashing |
key | byte | Hash key |
data | string | Data blob |
return | byte[] |
public static ComputeSignature ( |
||
credentials | ||
region | string | |
signedAt | System.DateTime | |
service | string | |
signedHeaders | string | |
canonicalRequest | string | |
return |
public static ComputeSignature ( string awsAccessKey, string awsSecretAccessKey, string region, System.DateTime signedAt, string service, string signedHeaders, string canonicalRequest ) : |
||
awsAccessKey | string | |
awsSecretAccessKey | string | |
region | string | |
signedAt | System.DateTime | |
service | string | |
signedHeaders | string | |
canonicalRequest | string | |
return |
public static ComputeSignature ( string awsAccessKey, string awsSecretAccessKey, string region, System.DateTime signedAt, string service, string signedHeaders, string canonicalRequest, |
||
awsAccessKey | string | |
awsSecretAccessKey | string | |
region | string | |
signedAt | System.DateTime | |
service | string | |
signedHeaders | string | |
canonicalRequest | string | |
metrics | ||
return |
public static DetermineSigningRegion ( IClientConfig clientConfig, string serviceName, RegionEndpoint alternateEndpoint, IRequest request ) : string | ||
clientConfig | IClientConfig | |
serviceName | string | |
alternateEndpoint | RegionEndpoint | |
request | IRequest | |
return | string |
public static FormatDateTime ( System.DateTime dt, string formatString ) : string | ||
dt | System.DateTime | |
formatString | string | The required format |
return | string |
protected static GetParametersToCanonicalize ( IRequest request ) : string>.IDictionary |
||
request | IRequest | The in-flight request being signed |
return | string>.IDictionary |
public static InitializeHeaders ( string>.IDictionary |
||
headers | string>.IDictionary | The current set of headers |
requestEndpoint | ||
return | System.DateTime |
public static InitializeHeaders ( string>.IDictionary |
||
headers | string>.IDictionary | The current set of headers |
requestEndpoint | ||
requestDateTime | System.DateTime | |
return | System.DateTime |
public static SetRequestBodyHash ( IRequest request ) : string | ||
request | IRequest | |
return | string |
public Sign ( IRequest request, IClientConfig clientConfig, |
||
request | IRequest | /// The request to compute the signature for. Additional headers mandated by the AWS4 protocol /// ('host' and 'x-amz-date') will be added to the request before signing. /// |
clientConfig | IClientConfig | /// Client configuration data encompassing the service call (notably authentication /// region, endpoint and service name). /// |
metrics | /// Metrics for the request /// | |
awsAccessKeyId | string | /// The AWS public key for the account making the service call. /// |
awsSecretAccessKey | string | /// The AWS secret key for the account making the call, in clear text. /// |
return | void |
public static SignBlob ( byte key, byte data ) : byte[] | ||
key | byte | |
data | byte | |
return | byte[] |
public static SignBlob ( byte key, string data ) : byte[] | ||
key | byte | |
data | string | |
return | byte[] |
public SignRequest ( IRequest request, IClientConfig clientConfig, |
||
request | IRequest | /// The request to compute the signature for. Additional headers mandated by the AWS4 protocol /// ('host' and 'x-amz-date') will be added to the request before signing. /// |
clientConfig | IClientConfig | /// Client configuration data encompassing the service call (notably authentication /// region, endpoint and service name). /// |
metrics | /// Metrics for the request. /// | |
awsAccessKeyId | string | /// The AWS public key for the account making the service call. /// |
awsSecretAccessKey | string | /// The AWS secret key for the account making the call, in clear text. /// |
return |
protected static SortAndPruneHeaders ( string>.IEnumerable |
||
requestHeaders | string>.IEnumerable | The set of proposed headers for the request |
return | string>.IDictionary |