Class ChecksumUtil
java.lang.Object
software.amazon.awssdk.http.auth.aws.internal.signer.util.ChecksumUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn implementation of aChecksumAlgorithmthat will map toConstantChecksum, which provides a constant checksum. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringchecksumHeaderName(ChecksumAlgorithm checksumAlgorithm) Get the correct checksum header name based on the checksum-algorithm.static Checksummerchecksummer(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request, Boolean isPayloadSigningOverride) static SdkChecksumfromChecksumAlgorithm(ChecksumAlgorithm checksumAlgorithm) Gets the SdkChecksum object based on the given ChecksumAlgorithm.static booleanhasChecksumHeader(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request) static booleanisEventStreaming(SdkHttpRequest request) static booleanisPayloadSigning(BaseSignRequest<?, ? extends AwsCredentialsIdentity> request) static byte[]longToByte(Long input) static voidreadAll(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 booleanuseChunkEncoding(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)
-