Class AwsS3V4ChunkSigner
- java.lang.Object
-
- software.amazon.awssdk.auth.signer.internal.chunkedencoding.AwsS3V4ChunkSigner
-
- All Implemented Interfaces:
AwsChunkSigner
public class AwsS3V4ChunkSigner extends Object implements AwsChunkSigner
An implementation of AwsChunkSigner that can calculate a Sigv4 compatible chunk signature.
-
-
Field Summary
Fields Modifier and Type Field Description static int
SIGNATURE_LENGTH
-
Constructor Summary
Constructors Constructor Description AwsS3V4ChunkSigner(byte[] signingKey, String datetime, String keyPath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
getSignatureLength()
String
signChecksumChunk(byte[] calculatedChecksum, String previousSignature, String checksumHeaderForTrailer)
Signed chunk must be of below format signature = Hex(HMAC(K, "AWS4-HMAC-SHA256-TRAILER"\n DATE\n KEYPATH\n final_chunk_signature\n Hex(SHA256(canonicalize(trailing-headers)))))String
signChunk(byte[] chunkData, String previousSignature)
-
-
-
Field Detail
-
SIGNATURE_LENGTH
public static final int SIGNATURE_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
signChunk
public String signChunk(byte[] chunkData, String previousSignature)
- Specified by:
signChunk
in interfaceAwsChunkSigner
-
signChecksumChunk
public String signChecksumChunk(byte[] calculatedChecksum, String previousSignature, String checksumHeaderForTrailer)
Signed chunk must be of below format signature = Hex(HMAC(K, "AWS4-HMAC-SHA256-TRAILER"\n DATE\n KEYPATH\n final_chunk_signature\n Hex(SHA256(canonicalize(trailing-headers)))))- Specified by:
signChecksumChunk
in interfaceAwsChunkSigner
- Returns:
- Signed Checksum in above signature format.
-
getSignatureLength
public static int getSignatureLength()
-
-