Module Object.Checksum

module Algorithm : sig ... end
module Type : sig ... end
module Mode : sig ... end
type value = private {
  1. algorithm : Algorithm.t;
  2. value : string;
}

Explicit checksum value supplied by the caller or returned for a part. The value is the base64/string payload expected by the selected algorithm. Values remain inspectable, but use value to construct outbound request checksums so unknown response-only algorithms cannot be sent.

val value : algorithm:Algorithm.t -> value:string -> (value, Awskit.Error.t) Stdlib.result

Validate and wrap an explicit outbound checksum value. Unknown algorithms are rejected because they cannot be rendered safely in request headers.

val value_exn : algorithm:Algorithm.t -> value:string -> value

Like value, but raises Awskit.Error.Awskit_error carrying the structured validation error on validation failure.

val response_value : algorithm:Algorithm.t -> value:string -> value

Wrap a checksum value observed in S3 response metadata. This preserves response-only future algorithms; request builders revalidate values before sending them.

type response = {
  1. values : value list;
  2. checksum_type : Type.t option;
}

Modeled checksum headers returned by object and multipart operations.

type summary = {
  1. algorithms : Algorithm.t list;
  2. checksum_type : Type.t option;
}

Compact checksum metadata returned by list operations.

val empty_summary : summary

Empty checksum summary for responses that do not include checksum metadata.