package checksum

Import Path
	github.com/aws/aws-sdk-go-v2/service/internal/checksum (on go.dev)

Dependency Relation
	imports 19 packages, and imported by one package


Package-Level Type Names (total 21, in which 3 are exported)
/* sort exporteds by: | */
Algorithm represents the checksum algorithms supported ( Algorithm) String() string Algorithm : expvar.Var Algorithm : fmt.Stringer func FilterSupportedAlgorithms(vs []string) []Algorithm func ParseAlgorithm(v string) (Algorithm, error) func AlgorithmChecksumLength(v Algorithm) (int, error) func AlgorithmHTTPHeader(v Algorithm) string func NewAlgorithmHash(v Algorithm) (hash.Hash, error) const AlgorithmCRC32 const AlgorithmCRC32C const AlgorithmSHA1 const AlgorithmSHA256
InputMiddlewareOptions provides the options for the request checksum middleware setup. Enables support for computing the SHA256 checksum of input payloads along with the algorithm specified checksum. Prevents downstream middleware handlers (computePayloadSHA256) re-reading the payload. The SHA256 payload checksum will only be used for computed for requests that are not TLS, or do not enable trailing checksums. The SHA256 payload hash will not be computed, if the Algorithm's header is already set on the request. Enables support for setting the aws-chunked decoded content length header for the decoded length of the underlying stream. Will only be set when used with trailing checksums, and aws-chunked content-encoding. Enables support for wrapping the serialized input payload with a content-encoding: aws-check wrapper, and including a trailer for the algorithm's checksum value. The checksum will not be computed, nor added as trailing checksum, if the Algorithm's header is already set on the request. GetAlgorithm is a function to get the checksum algorithm of the input payload from the input parameters. Given the input parameter value, the function must return the algorithm and true, or false if no algorithm is specified. Forces the middleware to compute the input payload's checksum. The request will fail if the algorithm is not specified or unable to compute the checksum. func AddInputMiddleware(stack *middleware.Stack, options InputMiddlewareOptions) (err error)
OutputMiddlewareOptions provides options for configuring output checksum validation middleware. GetValidationMode is a function to get the checksum validation mode of the output payload from the input parameters. Given the input parameter value, the function must return the validation mode and true, or false if no mode is specified. If set the middleware will ignore output multipart checksums. Otherwise an checksum format error will be returned by the middleware. When set the middleware will log when the output contains a multipart checksum that was, skipped and not validated. When set the middleware will log when output does not have checksum or algorithm to validate. The set of checksum algorithms that should be used for response payload checksum validation. The algorithm(s) used will be a union of the output's returned algorithms and this set. Only the first algorithm in the union is currently used. func AddOutputMiddleware(stack *middleware.Stack, options OutputMiddlewareOptions) error
Package-Level Functions (total 32, in which 13 are exported)
AddInputMiddleware adds the middleware for performing checksum computing of request payloads, and checksum validation of response payloads.
AddOutputMiddleware adds the middleware for validating response payload's checksum.
AlgorithmChecksumLength returns the length of the algorithm's checksum in bytes. If the algorithm is not known, an error is returned.
AlgorithmHTTPHeader returns the HTTP header for the algorithm's hash.
FilterSupportedAlgorithms filters the set of algorithms, returning a slice of algorithms that are supported.
GetComputedInputChecksums returns the map of checksum algorithm to their computed value stored in the middleware Metadata. Returns false if no values were stored in the Metadata.
GetOutputValidationAlgorithmsUsed returns the checksum algorithms used stored in the middleware Metadata. Returns false if no algorithms were stored in the Metadata.
NewAlgorithmHash returns a hash.Hash for the checksum algorithm. Error is returned if the algorithm is unknown.
ParseAlgorithm attempts to parse the provided value into a checksum algorithm, matching without case. Returns the algorithm matched, or an error if the algorithm wasn't matched.
RemoveInputMiddleware Removes the compute input payload checksum middleware handlers from the stack.
RemoveOutputMiddleware Removes the compute input payload checksum middleware handlers from the stack.
SetComputedInputChecksums stores the map of checksum algorithm to their computed value in the middleware Metadata. Overwrites any values that currently exist in the metadata.
SetOutputValidationAlgorithmsUsed stores the checksum algorithms used in the middleware Metadata.
Package-Level Variables (total 3, none are exported)
Package-Level Constants (total 15, in which 4 are exported)
AlgorithmCRC32 represents CRC32 hash algorithm
AlgorithmCRC32C represents CRC32C hash algorithm
AlgorithmSHA1 represents SHA1 hash algorithm
AlgorithmSHA256 represents SHA256 hash algorithm