Skip to content

Commit

Permalink
fix: use SHA256 for default checksum algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Sep 20, 2024
1 parent 17656ba commit aad6e6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/middleware-flexible-checksums/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.W
*/
export enum ChecksumAlgorithm {
/**
* @deprecated Use {@link ChecksumAlgorithm.CRC32} instead.
* @deprecated Use {@link ChecksumAlgorithm.SHA256} instead.
*/
MD5 = "MD5",
CRC32 = "CRC32",
Expand All @@ -73,7 +73,7 @@ export enum ChecksumLocation {
/**
* @internal
*/
export const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;
export const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.SHA256;

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion private/aws-middleware-test/src/middleware-serde.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("middleware-serde", () => {
"x-amz-acl": "private",
"content-length": "509",
Expect: "100-continue",
"x-amz-checksum-crc32": "XnKFaw==",
"x-amz-checksum-sha256": "wKiXgOGqxd+hdgTp4lYW57q7oLZV2xib5JtMNSVDuyI=",
host: "s3.us-west-2.amazonaws.com",
"x-amz-content-sha256": "c0a89780e1aac5dfa17604e9e25616e7babba0b655db189be49b4c352543bb22",
},
Expand Down

0 comments on commit aad6e6f

Please sign in to comment.