• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  *  http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 package software.amazon.awssdk.core;
17 
18 import software.amazon.awssdk.annotations.SdkInternalApi;
19 import software.amazon.awssdk.core.interceptor.ExecutionAttribute;
20 import software.amazon.awssdk.core.internal.signer.SigningMethod;
21 
22 /**
23  * Defines all the constants that are used while adding and validating Http checksum for an operation.
24  */
25 @SdkInternalApi
26 public final class HttpChecksumConstant {
27 
28     public static final String HTTP_CHECKSUM_HEADER_PREFIX = "x-amz-checksum";
29     public static final String X_AMZ_TRAILER = "x-amz-trailer";
30     public static final String CONTENT_SHA_256_FOR_UNSIGNED_TRAILER = "STREAMING-UNSIGNED-PAYLOAD-TRAILER";
31 
32     public static final String AWS_CHUNKED_HEADER = "aws-chunked";
33 
34     public static final ExecutionAttribute<String> HTTP_CHECKSUM_VALUE =
35         new ExecutionAttribute<>("HttpChecksumValue");
36 
37     public static final ExecutionAttribute<SigningMethod> SIGNING_METHOD =
38         new ExecutionAttribute<>("SigningMethod");
39 
40     public static final String HEADER_FOR_TRAILER_REFERENCE = "x-amz-trailer";
41 
42     /**
43      * Default chunk size for Async trailer based checksum data transfer*
44      */
45     public static final int DEFAULT_ASYNC_CHUNK_SIZE = 16 * 1024;
46 
HttpChecksumConstant()47     private HttpChecksumConstant() {
48     }
49 }
50