Class ChecksumUtil
java.lang.Object
software.amazon.awssdk.http.auth.aws.internal.signer.util.ChecksumUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An implementation of aChecksumAlgorithm
that will map toConstantChecksum
, which provides a constant checksum. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checksumHeaderName
(ChecksumAlgorithm checksumAlgorithm) Get the correct checksum header name based on the checksum-algorithm.static Checksummer
checksummer
(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request, Boolean isPayloadSigningOverride) static SdkChecksum
fromChecksumAlgorithm
(ChecksumAlgorithm checksumAlgorithm) Gets the SdkChecksum object based on the given ChecksumAlgorithm.static boolean
hasChecksumHeader
(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request) static boolean
isEventStreaming
(SdkHttpRequest request) static boolean
isPayloadSigning
(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request) static byte[]
longToByte
(Long input) static void
readAll
(InputStream inputStream) Read the entirety of an input-stream - this is useful when the stream has side-effects (such as calculating a checksum) when it gets read.static boolean
useChunkEncoding
(boolean payloadSigningEnabled, boolean chunkEncodingEnabled, boolean isTrailingOrFlexible)
-
Method Details
-
checksumHeaderName
Get the correct checksum header name based on the checksum-algorithm. This is required to be of the formx-amz-checksum-*
, where '*' is alphanumeric checksum-algorithm-id in lower-case form. Examples include:x-amz-checksum-sha256, x-amz-checksum-sha1, x-amz-checksum-crc32, x-amz-checksum-crc32c, x-amz-checksum-md5
-
fromChecksumAlgorithm
Gets the SdkChecksum object based on the given ChecksumAlgorithm. -
readAll
Read the entirety of an input-stream - this is useful when the stream has side-effects (such as calculating a checksum) when it gets read. -
longToByte
-
hasChecksumHeader
public static boolean hasChecksumHeader(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request) -
useChunkEncoding
public static boolean useChunkEncoding(boolean payloadSigningEnabled, boolean chunkEncodingEnabled, boolean isTrailingOrFlexible) -
isPayloadSigning
-
isEventStreaming
-
checksummer
public static Checksummer checksummer(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request, Boolean isPayloadSigningOverride)
-