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.services.s3.internal.checksums; 17 18 import software.amazon.awssdk.annotations.SdkInternalApi; 19 20 @SdkInternalApi 21 public final class ChecksumConstant { 22 23 /** 24 * Header name for the content-length of an S3 object. 25 */ 26 public static final String CONTENT_LENGTH_HEADER = "Content-Length"; 27 28 /** 29 * Header name for specifying S3 to send a trailing checksum. 30 */ 31 public static final String ENABLE_CHECKSUM_REQUEST_HEADER = "x-amz-te"; 32 33 /** 34 * Header name for specifying if trailing checksums were sent on an object. 35 */ 36 public static final String CHECKSUM_ENABLED_RESPONSE_HEADER = "x-amz-transfer-encoding"; 37 38 /** 39 * Header value for specifying MD5 as the trailing checksum of an object. 40 */ 41 public static final String ENABLE_MD5_CHECKSUM_HEADER_VALUE = "append-md5"; 42 43 /** 44 * Header value for specifying server side encryption. 45 */ 46 public static final String SERVER_SIDE_ENCRYPTION_HEADER = "x-amz-server-side-encryption"; 47 48 /** 49 * Header value for specifying server side encryption with a customer managed key. 50 */ 51 public static final String SERVER_SIDE_CUSTOMER_ENCRYPTION_HEADER = "x-amz-server-side-encryption-customer-algorithm"; 52 53 /** 54 * Length of an MD5 checksum in bytes. 55 */ 56 public static final int S3_MD5_CHECKSUM_LENGTH = 16; 57 ChecksumConstant()58 private ChecksumConstant() { 59 } 60 } 61