@depup/aws-sdk__checksums 3.1000.18-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +32 -0
  3. package/changes.json +14 -0
  4. package/crc.d.ts +5 -0
  5. package/crc.js +5 -0
  6. package/dist-cjs/index.js +22 -0
  7. package/dist-cjs/submodules/crc/index.js +159 -0
  8. package/dist-cjs/submodules/flexible-checksums/index.js +444 -0
  9. package/dist-cjs/submodules/md5/index.js +4 -0
  10. package/dist-cjs/submodules/sha/index.js +312 -0
  11. package/dist-es/index.js +2 -0
  12. package/dist-es/submodules/crc/crc32c/Crc32cJs.js +31 -0
  13. package/dist-es/submodules/crc/crc32c/Crc32cNode.js +2 -0
  14. package/dist-es/submodules/crc/crc64-nvme/Crc64Nvme.js +18 -0
  15. package/dist-es/submodules/crc/crc64-nvme/Crc64NvmeJs.js +92 -0
  16. package/dist-es/submodules/crc/crc64-nvme/crc64-nvme-crt-container.js +3 -0
  17. package/dist-es/submodules/crc/index.browser.js +6 -0
  18. package/dist-es/submodules/crc/index.js +6 -0
  19. package/dist-es/submodules/flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.js +9 -0
  20. package/dist-es/submodules/flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.js +9 -0
  21. package/dist-es/submodules/flexible-checksums/configuration.js +1 -0
  22. package/dist-es/submodules/flexible-checksums/constants.js +25 -0
  23. package/dist-es/submodules/flexible-checksums/flexibleChecksumsInputMiddleware.js +37 -0
  24. package/dist-es/submodules/flexible-checksums/flexibleChecksumsMiddleware.js +123 -0
  25. package/dist-es/submodules/flexible-checksums/flexibleChecksumsResponseMiddleware.js +48 -0
  26. package/dist-es/submodules/flexible-checksums/getChecksum.js +2 -0
  27. package/dist-es/submodules/flexible-checksums/getChecksumAlgorithmForRequest.js +13 -0
  28. package/dist-es/submodules/flexible-checksums/getChecksumAlgorithmListForResponse.js +15 -0
  29. package/dist-es/submodules/flexible-checksums/getChecksumLocationName.js +2 -0
  30. package/dist-es/submodules/flexible-checksums/getFlexibleChecksumsPlugin.js +10 -0
  31. package/dist-es/submodules/flexible-checksums/hasHeader.js +9 -0
  32. package/dist-es/submodules/flexible-checksums/hasHeaderWithPrefix.js +9 -0
  33. package/dist-es/submodules/flexible-checksums/index.js +6 -0
  34. package/dist-es/submodules/flexible-checksums/isChecksumWithPartNumber.js +13 -0
  35. package/dist-es/submodules/flexible-checksums/isStreaming.js +2 -0
  36. package/dist-es/submodules/flexible-checksums/resolveFlexibleChecksumsConfig.js +11 -0
  37. package/dist-es/submodules/flexible-checksums/selectChecksumAlgorithmFunction.js +27 -0
  38. package/dist-es/submodules/flexible-checksums/stringHasher.js +6 -0
  39. package/dist-es/submodules/flexible-checksums/stringUnionSelector.js +14 -0
  40. package/dist-es/submodules/flexible-checksums/types.js +15 -0
  41. package/dist-es/submodules/flexible-checksums/validateChecksumFromResponse.js +45 -0
  42. package/dist-es/submodules/md5/index.js +1 -0
  43. package/dist-es/submodules/sha/index.browser.js +4 -0
  44. package/dist-es/submodules/sha/index.js +4 -0
  45. package/dist-es/submodules/sha/sha1/Sha1Js.js +173 -0
  46. package/dist-es/submodules/sha/sha1/Sha1Node.js +59 -0
  47. package/dist-es/submodules/sha/sha1/Sha1WebCrypto.js +71 -0
  48. package/dist-types/index.d.ts +3 -0
  49. package/dist-types/submodules/crc/crc32c/Crc32cJs.d.ts +13 -0
  50. package/dist-types/submodules/crc/crc32c/Crc32cNode.d.ts +13 -0
  51. package/dist-types/submodules/crc/crc64-nvme/Crc64Nvme.d.ts +21 -0
  52. package/dist-types/submodules/crc/crc64-nvme/Crc64NvmeJs.d.ts +14 -0
  53. package/dist-types/submodules/crc/crc64-nvme/crc64-nvme-crt-container.d.ts +11 -0
  54. package/dist-types/submodules/crc/index.browser.d.ts +5 -0
  55. package/dist-types/submodules/crc/index.d.ts +6 -0
  56. package/dist-types/submodules/flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.d.ts +14 -0
  57. package/dist-types/submodules/flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.d.ts +14 -0
  58. package/dist-types/submodules/flexible-checksums/configuration.d.ts +58 -0
  59. package/dist-types/submodules/flexible-checksums/constants.d.ts +83 -0
  60. package/dist-types/submodules/flexible-checksums/flexibleChecksumsInputMiddleware.d.ts +22 -0
  61. package/dist-types/submodules/flexible-checksums/flexibleChecksumsMiddleware.d.ts +33 -0
  62. package/dist-types/submodules/flexible-checksums/flexibleChecksumsResponseMiddleware.d.ts +27 -0
  63. package/dist-types/submodules/flexible-checksums/getChecksum.d.ts +6 -0
  64. package/dist-types/submodules/flexible-checksums/getChecksumAlgorithmForRequest.d.ts +22 -0
  65. package/dist-types/submodules/flexible-checksums/getChecksumAlgorithmListForResponse.d.ts +6 -0
  66. package/dist-types/submodules/flexible-checksums/getChecksumLocationName.d.ts +5 -0
  67. package/dist-types/submodules/flexible-checksums/getFlexibleChecksumsPlugin.d.ts +14 -0
  68. package/dist-types/submodules/flexible-checksums/hasHeader.d.ts +6 -0
  69. package/dist-types/submodules/flexible-checksums/hasHeaderWithPrefix.d.ts +6 -0
  70. package/dist-types/submodules/flexible-checksums/index.d.ts +9 -0
  71. package/dist-types/submodules/flexible-checksums/isChecksumWithPartNumber.d.ts +1 -0
  72. package/dist-types/submodules/flexible-checksums/isStreaming.d.ts +4 -0
  73. package/dist-types/submodules/flexible-checksums/resolveFlexibleChecksumsConfig.d.ts +57 -0
  74. package/dist-types/submodules/flexible-checksums/selectChecksumAlgorithmFunction.d.ts +7 -0
  75. package/dist-types/submodules/flexible-checksums/stringHasher.d.ts +5 -0
  76. package/dist-types/submodules/flexible-checksums/stringUnionSelector.d.ts +12 -0
  77. package/dist-types/submodules/flexible-checksums/types.d.ts +9 -0
  78. package/dist-types/submodules/flexible-checksums/validateChecksumFromResponse.d.ts +13 -0
  79. package/dist-types/submodules/md5/index.d.ts +1 -0
  80. package/dist-types/submodules/sha/index.browser.d.ts +3 -0
  81. package/dist-types/submodules/sha/index.d.ts +4 -0
  82. package/dist-types/submodules/sha/sha1/Sha1Js.d.ts +26 -0
  83. package/dist-types/submodules/sha/sha1/Sha1Node.d.ts +13 -0
  84. package/dist-types/submodules/sha/sha1/Sha1WebCrypto.d.ts +22 -0
  85. package/dist-types/ts3.4/index.d.ts +26 -0
  86. package/dist-types/ts3.4/submodules/crc/crc32c/Crc32cJs.d.ts +8 -0
  87. package/dist-types/ts3.4/submodules/crc/crc32c/Crc32cNode.d.ts +5 -0
  88. package/dist-types/ts3.4/submodules/crc/crc64-nvme/Crc64Nvme.d.ts +8 -0
  89. package/dist-types/ts3.4/submodules/crc/crc64-nvme/Crc64NvmeJs.d.ts +9 -0
  90. package/dist-types/ts3.4/submodules/crc/crc64-nvme/crc64-nvme-crt-container.d.ts +4 -0
  91. package/dist-types/ts3.4/submodules/crc/index.browser.d.ts +5 -0
  92. package/dist-types/ts3.4/submodules/crc/index.d.ts +6 -0
  93. package/dist-types/ts3.4/submodules/flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS.d.ts +5 -0
  94. package/dist-types/ts3.4/submodules/flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS.d.ts +5 -0
  95. package/dist-types/ts3.4/submodules/flexible-checksums/configuration.d.ts +26 -0
  96. package/dist-types/ts3.4/submodules/flexible-checksums/constants.d.ts +27 -0
  97. package/dist-types/ts3.4/submodules/flexible-checksums/flexibleChecksumsInputMiddleware.d.ts +10 -0
  98. package/dist-types/ts3.4/submodules/flexible-checksums/flexibleChecksumsMiddleware.d.ts +14 -0
  99. package/dist-types/ts3.4/submodules/flexible-checksums/flexibleChecksumsResponseMiddleware.d.ts +11 -0
  100. package/dist-types/ts3.4/submodules/flexible-checksums/getChecksum.d.ts +9 -0
  101. package/dist-types/ts3.4/submodules/flexible-checksums/getChecksumAlgorithmForRequest.d.ts +15 -0
  102. package/dist-types/ts3.4/submodules/flexible-checksums/getChecksumAlgorithmListForResponse.d.ts +4 -0
  103. package/dist-types/ts3.4/submodules/flexible-checksums/getChecksumLocationName.d.ts +2 -0
  104. package/dist-types/ts3.4/submodules/flexible-checksums/getFlexibleChecksumsPlugin.d.ts +14 -0
  105. package/dist-types/ts3.4/submodules/flexible-checksums/hasHeader.d.ts +2 -0
  106. package/dist-types/ts3.4/submodules/flexible-checksums/hasHeaderWithPrefix.d.ts +2 -0
  107. package/dist-types/ts3.4/submodules/flexible-checksums/index.d.ts +31 -0
  108. package/dist-types/ts3.4/submodules/flexible-checksums/isChecksumWithPartNumber.d.ts +1 -0
  109. package/dist-types/ts3.4/submodules/flexible-checksums/isStreaming.d.ts +1 -0
  110. package/dist-types/ts3.4/submodules/flexible-checksums/resolveFlexibleChecksumsConfig.d.ts +25 -0
  111. package/dist-types/ts3.4/submodules/flexible-checksums/selectChecksumAlgorithmFunction.d.ts +7 -0
  112. package/dist-types/ts3.4/submodules/flexible-checksums/stringHasher.d.ts +5 -0
  113. package/dist-types/ts3.4/submodules/flexible-checksums/stringUnionSelector.d.ts +10 -0
  114. package/dist-types/ts3.4/submodules/flexible-checksums/types.d.ts +3 -0
  115. package/dist-types/ts3.4/submodules/flexible-checksums/validateChecksumFromResponse.d.ts +12 -0
  116. package/dist-types/ts3.4/submodules/md5/index.d.ts +1 -0
  117. package/dist-types/ts3.4/submodules/sha/index.browser.d.ts +3 -0
  118. package/dist-types/ts3.4/submodules/sha/index.d.ts +4 -0
  119. package/dist-types/ts3.4/submodules/sha/sha1/Sha1Js.d.ts +20 -0
  120. package/dist-types/ts3.4/submodules/sha/sha1/Sha1Node.d.ts +5 -0
  121. package/dist-types/ts3.4/submodules/sha/sha1/Sha1WebCrypto.d.ts +14 -0
  122. package/flexible-checksums.d.ts +5 -0
  123. package/flexible-checksums.js +5 -0
  124. package/md5.d.ts +5 -0
  125. package/md5.js +5 -0
  126. package/package.json +159 -0
  127. package/sha.d.ts +5 -0
  128. package/sha.js +5 -0
@@ -0,0 +1,4 @@
1
+ export { Sha1Js } from "./sha1/Sha1Js";
2
+ export { Sha1Node, Sha1Node as Sha1 } from "./sha1/Sha1Node";
3
+ export { Sha1WebCrypto } from "./sha1/Sha1WebCrypto";
4
+ export { Sha256, Sha256Js, Sha256Node } from "@smithy/core/checksum";
@@ -0,0 +1,26 @@
1
+ import type { Checksum, SourceData } from "@smithy/types";
2
+ /**
3
+ * Pure JS SHA-1 implementation with HMAC support.
4
+ * Non-destructive digest for plain hash — safe to call digest() multiple times.
5
+ * @see https://csrc.nist.gov/pubs/fips/180-4/upd1/final
6
+ * @public
7
+ */
8
+ export declare class Sha1Js implements Checksum {
9
+ readonly digestLength = 20;
10
+ private state;
11
+ private w?;
12
+ private buffer;
13
+ private bufferLength;
14
+ private bytesHashed;
15
+ private finished;
16
+ private readonly inner?;
17
+ private readonly outer?;
18
+ constructor(secret?: SourceData);
19
+ update(data: Uint8Array): void;
20
+ digest(): Promise<Uint8Array>;
21
+ reset(): void;
22
+ private digestSync;
23
+ private static normalizeKey;
24
+ private hashBuffer;
25
+ private hashBufferWith;
26
+ }
@@ -0,0 +1,13 @@
1
+ import type { Checksum, SourceData } from "@smithy/types";
2
+ /**
3
+ * SHA-1 using Node.js crypto native implementation when available,
4
+ * falling back to the pure JS implementation.
5
+ * @public
6
+ */
7
+ export interface Sha1Node extends Checksum {
8
+ readonly digestLength: 20;
9
+ }
10
+ /**
11
+ * @public
12
+ */
13
+ export declare const Sha1Node: new (secret?: SourceData) => Sha1Node;
@@ -0,0 +1,22 @@
1
+ import type { Checksum, SourceData } from "@smithy/types";
2
+ /**
3
+ * SHA-1 using the Web Crypto API (crypto.subtle) when available,
4
+ * falling back to the pure JS implementation.
5
+ *
6
+ * Caution: buffers data entirely in memory since WebCrypto requires
7
+ * all data at once for digest().
8
+ * @public
9
+ */
10
+ export declare class Sha1WebCrypto implements Checksum {
11
+ readonly digestLength: 20;
12
+ private readonly secret?;
13
+ private pending;
14
+ private pendingBytes;
15
+ private fallback?;
16
+ private finished;
17
+ constructor(secret?: SourceData);
18
+ update(data: Uint8Array): void;
19
+ digest(): Promise<Uint8Array>;
20
+ reset(): void;
21
+ private switchToFallback;
22
+ }
@@ -0,0 +1,26 @@
1
+ export { Crc64Nvme, Crc64NvmeJs, crc64NvmeCrtContainer } from "@aws-sdk/checksums/crc";
2
+ export {
3
+ ENV_REQUEST_CHECKSUM_CALCULATION,
4
+ CONFIG_REQUEST_CHECKSUM_CALCULATION,
5
+ NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,
6
+ ENV_RESPONSE_CHECKSUM_VALIDATION,
7
+ CONFIG_RESPONSE_CHECKSUM_VALIDATION,
8
+ NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,
9
+ RequestChecksumCalculation,
10
+ DEFAULT_REQUEST_CHECKSUM_CALCULATION,
11
+ ResponseChecksumValidation,
12
+ DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
13
+ ChecksumAlgorithm,
14
+ ChecksumLocation,
15
+ DEFAULT_CHECKSUM_ALGORITHM,
16
+ flexibleChecksumsMiddlewareOptions,
17
+ flexibleChecksumsMiddleware,
18
+ getFlexibleChecksumsPlugin,
19
+ resolveFlexibleChecksumsConfig,
20
+ } from "@aws-sdk/checksums/flexible-checksums";
21
+ export {
22
+ FlexibleChecksumsRequestMiddlewareConfig,
23
+ FlexibleChecksumsMiddlewareConfig,
24
+ FlexibleChecksumsInputConfig,
25
+ FlexibleChecksumsResolvedConfig,
26
+ } from "@aws-sdk/checksums/flexible-checksums";
@@ -0,0 +1,8 @@
1
+ import { Checksum } from "@smithy/types";
2
+ export declare class Crc32cJs implements Checksum {
3
+ readonly digestLength = 4;
4
+ private crc;
5
+ update(data: Uint8Array): void;
6
+ digest(): Promise<Uint8Array>;
7
+ reset(): void;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { Checksum } from "@smithy/types";
2
+ export interface Crc32cNode extends Checksum {
3
+ readonly digestLength: 4;
4
+ }
5
+ export declare const Crc32cNode: new () => Crc32cNode;
@@ -0,0 +1,8 @@
1
+ import { Checksum } from "@smithy/types";
2
+ export declare class Crc64Nvme implements Checksum {
3
+ private impl;
4
+ constructor();
5
+ update(data: Uint8Array): void;
6
+ digest(): Promise<Uint8Array>;
7
+ reset(): void;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { Checksum } from "@smithy/types";
2
+ export declare class Crc64NvmeJs implements Checksum {
3
+ private c1;
4
+ private c2;
5
+ constructor();
6
+ update(data: Uint8Array): void;
7
+ digest(): Promise<Uint8Array>;
8
+ reset(): void;
9
+ }
@@ -0,0 +1,4 @@
1
+ import { ChecksumConstructor } from "@smithy/types";
2
+ export declare const crc64NvmeCrtContainer: {
3
+ CrtCrc64Nvme: null | ChecksumConstructor;
4
+ };
@@ -0,0 +1,5 @@
1
+ export { Crc32cJs, Crc32cJs as Crc32c } from "./crc32c/Crc32cJs";
2
+ export declare const Crc32cNode: symbol;
3
+ export { Crc64NvmeJs, Crc64NvmeJs as Crc64Nvme } from "./crc64-nvme/Crc64NvmeJs";
4
+ export { crc64NvmeCrtContainer } from "./crc64-nvme/crc64-nvme-crt-container";
5
+ export { Crc32, Crc32Js, Crc32Node } from "@smithy/core/checksum";
@@ -0,0 +1,6 @@
1
+ export { Crc32cJs } from "./crc32c/Crc32cJs";
2
+ export { Crc32cNode, Crc32cNode as Crc32c } from "./crc32c/Crc32cNode";
3
+ export { Crc64Nvme } from "./crc64-nvme/Crc64Nvme";
4
+ export { Crc64NvmeJs } from "./crc64-nvme/Crc64NvmeJs";
5
+ export { crc64NvmeCrtContainer } from "./crc64-nvme/crc64-nvme-crt-container";
6
+ export { Crc32, Crc32Js, Crc32Node } from "@smithy/core/checksum";
@@ -0,0 +1,5 @@
1
+ import { LoadedConfigSelectors } from "@smithy/core/config";
2
+ import { RequestChecksumCalculation } from "./constants";
3
+ export declare const ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
4
+ export declare const CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
5
+ export declare const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: LoadedConfigSelectors<RequestChecksumCalculation>;
@@ -0,0 +1,5 @@
1
+ import { LoadedConfigSelectors } from "@smithy/core/config";
2
+ import { ResponseChecksumValidation } from "./constants";
3
+ export declare const ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
4
+ export declare const CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
5
+ export declare const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: LoadedConfigSelectors<ResponseChecksumValidation>;
@@ -0,0 +1,26 @@
1
+ import {
2
+ BodyLengthCalculator,
3
+ ChecksumConstructor,
4
+ Encoder,
5
+ GetAwsChunkedEncodingStream,
6
+ HashConstructor,
7
+ Provider,
8
+ StreamCollector,
9
+ StreamHasher,
10
+ } from "@smithy/types";
11
+ import { RequestChecksumCalculation, ResponseChecksumValidation } from "./constants";
12
+ import { FlexibleChecksumsInputConfig } from "./resolveFlexibleChecksumsConfig";
13
+ export interface PreviouslyResolved {
14
+ base64Encoder: Encoder;
15
+ bodyLengthChecker: BodyLengthCalculator;
16
+ getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream;
17
+ md5: ChecksumConstructor | HashConstructor;
18
+ requestChecksumCalculation: Provider<RequestChecksumCalculation>;
19
+ responseChecksumValidation: Provider<ResponseChecksumValidation>;
20
+ sha1: ChecksumConstructor | HashConstructor;
21
+ sha256: ChecksumConstructor | HashConstructor;
22
+ streamHasher: StreamHasher<any>;
23
+ streamCollector: StreamCollector;
24
+ requestStreamBufferSize: number;
25
+ checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
26
+ }
@@ -0,0 +1,27 @@
1
+ export declare const RequestChecksumCalculation: {
2
+ readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
3
+ readonly WHEN_REQUIRED: "WHEN_REQUIRED";
4
+ };
5
+ export type RequestChecksumCalculation =
6
+ (typeof RequestChecksumCalculation)[keyof typeof RequestChecksumCalculation];
7
+ export declare const DEFAULT_REQUEST_CHECKSUM_CALCULATION: "WHEN_SUPPORTED";
8
+ export declare const ResponseChecksumValidation: {
9
+ readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
10
+ readonly WHEN_REQUIRED: "WHEN_REQUIRED";
11
+ };
12
+ export type ResponseChecksumValidation =
13
+ (typeof ResponseChecksumValidation)[keyof typeof ResponseChecksumValidation];
14
+ export declare const DEFAULT_RESPONSE_CHECKSUM_VALIDATION: "WHEN_SUPPORTED";
15
+ export declare enum ChecksumAlgorithm {
16
+ MD5 = "MD5",
17
+ CRC32 = "CRC32",
18
+ CRC32C = "CRC32C",
19
+ CRC64NVME = "CRC64NVME",
20
+ SHA1 = "SHA1",
21
+ SHA256 = "SHA256",
22
+ }
23
+ export declare enum ChecksumLocation {
24
+ HEADER = "header",
25
+ TRAILER = "trailer",
26
+ }
27
+ export declare const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;
@@ -0,0 +1,10 @@
1
+ import { RelativeMiddlewareOptions, SerializeMiddleware } from "@smithy/types";
2
+ import { PreviouslyResolved } from "./configuration";
3
+ export interface FlexibleChecksumsInputMiddlewareConfig {
4
+ requestValidationModeMember?: string;
5
+ }
6
+ export declare const flexibleChecksumsInputMiddlewareOptions: RelativeMiddlewareOptions;
7
+ export declare const flexibleChecksumsInputMiddleware: (
8
+ config: PreviouslyResolved,
9
+ middlewareConfig: FlexibleChecksumsInputMiddlewareConfig,
10
+ ) => SerializeMiddleware<any, any>;
@@ -0,0 +1,14 @@
1
+ import { BuildHandlerOptions, BuildMiddleware } from "@smithy/types";
2
+ import { PreviouslyResolved } from "./configuration";
3
+ export interface FlexibleChecksumsRequestMiddlewareConfig {
4
+ requestChecksumRequired: boolean;
5
+ requestAlgorithmMember?: {
6
+ name: string;
7
+ httpHeader?: string;
8
+ };
9
+ }
10
+ export declare const flexibleChecksumsMiddlewareOptions: BuildHandlerOptions;
11
+ export declare const flexibleChecksumsMiddleware: (
12
+ config: PreviouslyResolved,
13
+ middlewareConfig: FlexibleChecksumsRequestMiddlewareConfig,
14
+ ) => BuildMiddleware<any, any>;
@@ -0,0 +1,11 @@
1
+ import { DeserializeMiddleware, RelativeMiddlewareOptions } from "@smithy/types";
2
+ import { PreviouslyResolved } from "./configuration";
3
+ export interface FlexibleChecksumsResponseMiddlewareConfig {
4
+ requestValidationModeMember?: string;
5
+ responseAlgorithms?: string[];
6
+ }
7
+ export declare const flexibleChecksumsResponseMiddlewareOptions: RelativeMiddlewareOptions;
8
+ export declare const flexibleChecksumsResponseMiddleware: (
9
+ config: PreviouslyResolved,
10
+ middlewareConfig: FlexibleChecksumsResponseMiddlewareConfig,
11
+ ) => DeserializeMiddleware<any, any>;
@@ -0,0 +1,9 @@
1
+ import { ChecksumConstructor, Encoder, HashConstructor } from "@smithy/types";
2
+ export interface GetChecksumDigestOptions {
3
+ checksumAlgorithmFn: ChecksumConstructor | HashConstructor;
4
+ base64Encoder: Encoder;
5
+ }
6
+ export declare const getChecksum: (
7
+ body: unknown,
8
+ { checksumAlgorithmFn, base64Encoder }: GetChecksumDigestOptions,
9
+ ) => Promise<string>;
@@ -0,0 +1,15 @@
1
+ import { ChecksumAlgorithm } from "./constants";
2
+ import { RequestChecksumCalculation } from "./constants";
3
+ export interface GetChecksumAlgorithmForRequestOptions {
4
+ requestChecksumRequired: boolean;
5
+ requestAlgorithmMember?: string;
6
+ requestChecksumCalculation: RequestChecksumCalculation;
7
+ }
8
+ export declare const getChecksumAlgorithmForRequest: (
9
+ input: any,
10
+ {
11
+ requestChecksumRequired,
12
+ requestAlgorithmMember,
13
+ requestChecksumCalculation,
14
+ }: GetChecksumAlgorithmForRequestOptions,
15
+ ) => ChecksumAlgorithm | string | undefined;
@@ -0,0 +1,4 @@
1
+ import { ChecksumAlgorithm } from "./constants";
2
+ export declare const getChecksumAlgorithmListForResponse: (
3
+ responseAlgorithms?: string[],
4
+ ) => ChecksumAlgorithm[];
@@ -0,0 +1,2 @@
1
+ import { ChecksumAlgorithm } from "./constants";
2
+ export declare const getChecksumLocationName: (algorithm: ChecksumAlgorithm | string) => string;
@@ -0,0 +1,14 @@
1
+ import { Pluggable } from "@smithy/types";
2
+ import { PreviouslyResolved } from "./configuration";
3
+ import { FlexibleChecksumsInputMiddlewareConfig } from "./flexibleChecksumsInputMiddleware";
4
+ import { FlexibleChecksumsRequestMiddlewareConfig } from "./flexibleChecksumsMiddleware";
5
+ import { FlexibleChecksumsResponseMiddlewareConfig } from "./flexibleChecksumsResponseMiddleware";
6
+ export interface FlexibleChecksumsMiddlewareConfig
7
+ extends
8
+ FlexibleChecksumsRequestMiddlewareConfig,
9
+ FlexibleChecksumsInputMiddlewareConfig,
10
+ FlexibleChecksumsResponseMiddlewareConfig {}
11
+ export declare const getFlexibleChecksumsPlugin: (
12
+ config: PreviouslyResolved,
13
+ middlewareConfig: FlexibleChecksumsMiddlewareConfig,
14
+ ) => Pluggable<any, any>;
@@ -0,0 +1,2 @@
1
+ import { HeaderBag } from "@smithy/types";
2
+ export declare const hasHeader: (header: string, headers: HeaderBag) => boolean;
@@ -0,0 +1,2 @@
1
+ import { HeaderBag } from "@smithy/types";
2
+ export declare const hasHeaderWithPrefix: (headerPrefix: string, headers: HeaderBag) => boolean;
@@ -0,0 +1,31 @@
1
+ export {
2
+ ENV_REQUEST_CHECKSUM_CALCULATION,
3
+ CONFIG_REQUEST_CHECKSUM_CALCULATION,
4
+ NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,
5
+ } from "./NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS";
6
+ export {
7
+ ENV_RESPONSE_CHECKSUM_VALIDATION,
8
+ CONFIG_RESPONSE_CHECKSUM_VALIDATION,
9
+ NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,
10
+ } from "./NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS";
11
+ export {
12
+ RequestChecksumCalculation,
13
+ DEFAULT_REQUEST_CHECKSUM_CALCULATION,
14
+ ResponseChecksumValidation,
15
+ DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
16
+ ChecksumAlgorithm,
17
+ ChecksumLocation,
18
+ DEFAULT_CHECKSUM_ALGORITHM,
19
+ } from "./constants";
20
+ export { FlexibleChecksumsRequestMiddlewareConfig } from "./flexibleChecksumsMiddleware";
21
+ export {
22
+ flexibleChecksumsMiddlewareOptions,
23
+ flexibleChecksumsMiddleware,
24
+ } from "./flexibleChecksumsMiddleware";
25
+ export { FlexibleChecksumsMiddlewareConfig } from "./getFlexibleChecksumsPlugin";
26
+ export { getFlexibleChecksumsPlugin } from "./getFlexibleChecksumsPlugin";
27
+ export {
28
+ FlexibleChecksumsInputConfig,
29
+ FlexibleChecksumsResolvedConfig,
30
+ } from "./resolveFlexibleChecksumsConfig";
31
+ export { resolveFlexibleChecksumsConfig } from "./resolveFlexibleChecksumsConfig";
@@ -0,0 +1 @@
1
+ export declare const isChecksumWithPartNumber: (checksum: string) => boolean;
@@ -0,0 +1 @@
1
+ export declare const isStreaming: (body: unknown) => boolean;
@@ -0,0 +1,25 @@
1
+ import { ChecksumConstructor, Provider } from "@smithy/types";
2
+ import { RequestChecksumCalculation, ResponseChecksumValidation } from "./constants";
3
+ export interface FlexibleChecksumsInputConfig {
4
+ requestChecksumCalculation?: RequestChecksumCalculation | Provider<RequestChecksumCalculation>;
5
+ responseChecksumValidation?: ResponseChecksumValidation | Provider<ResponseChecksumValidation>;
6
+ requestStreamBufferSize?: number | false;
7
+ checksumAlgorithms?: {
8
+ CRC32?: ChecksumConstructor;
9
+ CRC32C?: ChecksumConstructor;
10
+ CRC64NVME?: ChecksumConstructor;
11
+ SHA1?: ChecksumConstructor;
12
+ SHA256?: ChecksumConstructor;
13
+ } & {
14
+ [algorithmId: string]: ChecksumConstructor;
15
+ };
16
+ }
17
+ export interface FlexibleChecksumsResolvedConfig {
18
+ requestChecksumCalculation: Provider<RequestChecksumCalculation>;
19
+ responseChecksumValidation: Provider<ResponseChecksumValidation>;
20
+ requestStreamBufferSize: number;
21
+ checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
22
+ }
23
+ export declare const resolveFlexibleChecksumsConfig: <T>(
24
+ input: T & FlexibleChecksumsInputConfig,
25
+ ) => T & FlexibleChecksumsResolvedConfig;
@@ -0,0 +1,7 @@
1
+ import { ChecksumConstructor, HashConstructor } from "@smithy/types";
2
+ import { PreviouslyResolved } from "./configuration";
3
+ import { ChecksumAlgorithm } from "./constants";
4
+ export declare const selectChecksumAlgorithmFunction: (
5
+ checksumAlgorithm: ChecksumAlgorithm | string,
6
+ config: PreviouslyResolved,
7
+ ) => ChecksumConstructor | HashConstructor;
@@ -0,0 +1,5 @@
1
+ import { ChecksumConstructor, HashConstructor } from "@smithy/types";
2
+ export declare const stringHasher: (
3
+ checksumAlgorithmFn: ChecksumConstructor | HashConstructor,
4
+ body: any,
5
+ ) => Promise<Uint8Array>;
@@ -0,0 +1,10 @@
1
+ export declare enum SelectorType {
2
+ ENV = "env",
3
+ CONFIG = "shared config entry",
4
+ }
5
+ export declare const stringUnionSelector: <U extends object, K extends keyof U>(
6
+ obj: Record<string, string | undefined>,
7
+ key: string,
8
+ union: U,
9
+ type: SelectorType,
10
+ ) => U[K] | undefined;
@@ -0,0 +1,3 @@
1
+ import { ChecksumAlgorithm } from "./constants";
2
+ export declare const CLIENT_SUPPORTED_ALGORITHMS: ChecksumAlgorithm[];
3
+ export declare const PRIORITY_ORDER_ALGORITHMS: ChecksumAlgorithm[];
@@ -0,0 +1,12 @@
1
+ import { HttpResponse } from "@smithy/core/protocols";
2
+ import { Logger } from "@smithy/types";
3
+ import { PreviouslyResolved } from "./configuration";
4
+ export interface ValidateChecksumFromResponseOptions {
5
+ config: PreviouslyResolved;
6
+ responseAlgorithms?: string[];
7
+ logger?: Logger;
8
+ }
9
+ export declare const validateChecksumFromResponse: (
10
+ response: HttpResponse,
11
+ { config, responseAlgorithms, logger }: ValidateChecksumFromResponseOptions,
12
+ ) => Promise<void>;
@@ -0,0 +1 @@
1
+ export { Md5, Md5Js, Md5Node } from "@smithy/core/checksum";
@@ -0,0 +1,3 @@
1
+ export { Sha1Js, Sha1Js as Sha1 } from "./sha1/Sha1Js";
2
+ export declare const Sha1Node: symbol;
3
+ export { Sha256, Sha256Js, Sha256Node, Sha256WebCrypto } from "@smithy/core/checksum";
@@ -0,0 +1,4 @@
1
+ export { Sha1Js } from "./sha1/Sha1Js";
2
+ export { Sha1Node, Sha1Node as Sha1 } from "./sha1/Sha1Node";
3
+ export { Sha1WebCrypto } from "./sha1/Sha1WebCrypto";
4
+ export { Sha256, Sha256Js, Sha256Node } from "@smithy/core/checksum";
@@ -0,0 +1,20 @@
1
+ import { Checksum, SourceData } from "@smithy/types";
2
+ export declare class Sha1Js implements Checksum {
3
+ readonly digestLength = 20;
4
+ private state;
5
+ private w?;
6
+ private buffer;
7
+ private bufferLength;
8
+ private bytesHashed;
9
+ private finished;
10
+ private readonly inner?;
11
+ private readonly outer?;
12
+ constructor(secret?: SourceData);
13
+ update(data: Uint8Array): void;
14
+ digest(): Promise<Uint8Array>;
15
+ reset(): void;
16
+ private digestSync;
17
+ private static normalizeKey;
18
+ private hashBuffer;
19
+ private hashBufferWith;
20
+ }
@@ -0,0 +1,5 @@
1
+ import { Checksum, SourceData } from "@smithy/types";
2
+ export interface Sha1Node extends Checksum {
3
+ readonly digestLength: 20;
4
+ }
5
+ export declare const Sha1Node: new (secret?: SourceData) => Sha1Node;
@@ -0,0 +1,14 @@
1
+ import { Checksum, SourceData } from "@smithy/types";
2
+ export declare class Sha1WebCrypto implements Checksum {
3
+ readonly digestLength: 20;
4
+ private readonly secret?;
5
+ private pending;
6
+ private pendingBytes;
7
+ private fallback?;
8
+ private finished;
9
+ constructor(secret?: SourceData);
10
+ update(data: Uint8Array): void;
11
+ digest(): Promise<Uint8Array>;
12
+ reset(): void;
13
+ private switchToFallback;
14
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ export * from "./dist-types/submodules/flexible-checksums/index";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ module.exports = require("./dist-cjs/submodules/flexible-checksums/index.js");
package/md5.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ export * from "./dist-types/submodules/md5/index";
package/md5.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ module.exports = require("./dist-cjs/submodules/md5/index.js");