Class AwsS3V4ChunkSigner

  • All Implemented Interfaces:
    AwsChunkSigner

    public class AwsS3V4ChunkSigner
    extends Object
    implements AwsChunkSigner
    An implementation of AwsChunkSigner that can calculate a Sigv4 compatible chunk signature.
    • Constructor Detail

      • AwsS3V4ChunkSigner

        public AwsS3V4ChunkSigner​(byte[] signingKey,
                                  String datetime,
                                  String keyPath)
    • Method Detail

      • 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 interface AwsChunkSigner
        Returns:
        Signed Checksum in above signature format.
      • getSignatureLength

        public static int getSignatureLength()