{"_id":"@aws-sdk/checksums@3.1001.2","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"dist":{"shasum":"87d7378504eed631da3e706fa918e1d546571647","tarball":"http://registry-npm.ywwl.com/@aws-sdk/checksums/download/@aws-sdk/checksums-3.1001.2.tgz","fileCount":127,"integrity":"sha512-gKRj5IXZ/O0ehk2rwfb55YygdNKNhK5N1l/Ztg/w06tk21AJtCPuyErETk2RS/6XOmpBkcZY6CN3GlQ2fWTh1g==","signatures":[{"sig":"MEQCIFY6JZqH6A2FIhSEJgdjOZ0QvMPL+XjgEWfc+PGVbm2BAiBdzlNQQsOQBfcV8q+GSO5xar8iAUQuFhvzhmFloKuvPg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCTGc7JQZuY5/CpxM5Wn/BrfK0QPDVpWYw2wKGhb7fhUwIgLFkuuLzEkqbO3ajUf0Aonme/C7L3rRjxWwH6HWSAQYc="}],"unpackedSize":134708,"size":27886,"noattachment":false,"key":"/@aws-sdk/checksums/-/@aws-sdk/checksums-3.1001.2.tgz"},"main":"./dist-cjs/index.js","name":"@aws-sdk/checksums","types":"./dist-types/index.d.ts","author":{"url":"https://aws.amazon.com/sdk-for-javascript/","name":"AWS SDK for JavaScript Team"},"module":"./dist-es/index.js","browser":{"./dist-es/submodules/crc/index.js":"./dist-es/submodules/crc/index.browser.js","./dist-es/submodules/sha/index.js":"./dist-es/submodules/sha/index.browser.js"},"engines":{"node":">=20.0.0"},"exports":{".":{"node":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","import":"./dist-es/index.js","module":"./dist-es/index.js","require":"./dist-cjs/index.js"},"./crc":{"node":"./dist-cjs/submodules/crc/index.js","types":"./dist-types/submodules/crc/index.d.ts","import":"./dist-es/submodules/crc/index.js","module":"./dist-es/submodules/crc/index.js","browser":"./dist-es/submodules/crc/index.browser.js","require":"./dist-cjs/submodules/crc/index.js","react-native":"./dist-es/submodules/crc/index.browser.js"},"./md5":{"node":"./dist-cjs/submodules/md5/index.js","types":"./dist-types/submodules/md5/index.d.ts","import":"./dist-es/submodules/md5/index.js","module":"./dist-es/submodules/md5/index.js","require":"./dist-cjs/submodules/md5/index.js"},"./sha":{"node":"./dist-cjs/submodules/sha/index.js","types":"./dist-types/submodules/sha/index.d.ts","import":"./dist-es/submodules/sha/index.js","module":"./dist-es/submodules/sha/index.js","browser":"./dist-es/submodules/sha/index.browser.js","require":"./dist-cjs/submodules/sha/index.js","react-native":"./dist-es/submodules/sha/index.browser.js"},"./package.json":{"node":"./package.json","import":"./package.json","module":"./package.json","require":"./package.json"},"./flexible-checksums":{"node":"./dist-cjs/submodules/flexible-checksums/index.js","types":"./dist-types/submodules/flexible-checksums/index.d.ts","import":"./dist-es/submodules/flexible-checksums/index.js","module":"./dist-es/submodules/flexible-checksums/index.js","require":"./dist-cjs/submodules/flexible-checksums/index.js"}},"license":"Apache-2.0","scripts":{"lint":"node ../../scripts/validation/submodules-linter.js","test":"yarn g:vitest run","build":"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","clean":"premove dist-cjs dist-es dist-types","build:es":"premove dist-es && tsc -p tsconfig.es.json","prebuild":"yarn lint","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts --mode development","benchmark":"node ./scripts/checksum-perf.mjs","build:cjs":"node ../../scripts/compilation/inline","test:watch":"yarn g:vitest watch","build:types":"premove dist-types && tsc -p tsconfig.types.json","extract:docs":"api-extractor run --local","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:integration":"yarn g:vitest run -c vitest.config.integ.mts","build:include:deps":"yarn g:turbo run build -F=\"$npm_package_name\"","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","test:integration:watch":"yarn g:vitest watch -c vitest.config.integ.mts"},"version":"3.1001.2","_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/checksums","repository":{"url":"git+https://github.com/aws/aws-sdk-js-v3.git","type":"git","directory":"packages-internal/checksums"},"_npmVersion":"11.7.0","description":"Checksum algorithms and flexible checksums middleware for the AWS SDK","directories":{},"maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"tslib":"^2.6.2","@smithy/core":"^3.35.2","@aws-sdk/core":"^3.978.2","@smithy/types":"^4.19.0","@aws-sdk/types":"^3.974.6"},"react-native":{"./dist-es/submodules/crc/index.js":"./dist-es/submodules/crc/index.browser.js","./dist-es/submodules/sha/index.js":"./dist-es/submodules/sha/index.browser.js"},"typesVersions":{"<4.5":{"*":["dist-types/ts3.4/submodules/*/index.d.ts"],"dist-types/*":["dist-types/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"premove":"4.0.0","typescript":"~7.0.2","concurrently":"7.0.0","downlevel-dts":"0.10.1","@tsconfig/recommended":"1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/checksums_3.1001.2_1791579227067_0.149864268063006"},"readme":"# @aws-sdk/checksums\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/checksums/latest.svg)](https://www.npmjs.com/package/@aws-sdk/checksums)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/checksums.svg)](https://www.npmjs.com/package/@aws-sdk/checksums)\n\nChecksum algorithms and flexible checksums middleware for the AWS SDK.\n\n## Standardized API\n\nThe following checksum API symbols are available.\n\n```ts\nimport { Sha1, Sha256 } from \"@aws-sdk/checksums/sha\";\nimport { Md5 } from \"@aws-sdk/checksums/md5\";\nimport { Crc32, Crc32c, Crc64Nvme } from \"@aws-sdk/checksums/crc\";\n```\n\nEach follows an identical interface, the Smithy Checksum interface:\n\n```ts\ninterface Checksum {\n  update(chunk: Uint8Array): void;\n  digest(): Promise<Uint8Array>;\n  reset();\n}\n```\n\nBytes go into update, and the checksums comes out of digest.\n\nWhere possible, digest is non-destructive. That means you can digest to get a checksum, and then\nkeep adding more data with update.\n\nSome checksums accept initial seeds.\n\n| Algorithm | Digest length | Non-destructive digest   | Accepts secret (HMAC) |\n| --------- | ------------- | ------------------------ | --------------------- |\n| Sha256    | 32 bytes      | ✅ (only without secret) | ✅                    |\n| Sha1      | 20 bytes      | ✅ (only without secret) | ✅                    |\n| Md5       | 16 bytes      | ✅                       | ❌                    |\n| Crc32     | 4 bytes       | ✅                       | ❌                    |\n| Crc32c    | 4 bytes       | ✅                       | ❌                    |\n| Crc64Nvme | 8 bytes       | ✅                       | ❌                    |\n\n## Selective API\n\nBy default, the canonically named checksum algorithms (above) will use the best implementation for\nyour bundling or runtime environment, some of which use natively available implementations.\nAll checksums have a pure JavaScript fallback. To use a specific implementation, you\ncan use the following implementation-specific import symbols, but this is not recommended.\n\n```ts\nimport {\n  // SHA1\n  Sha1Js,\n  Sha1Node,\n  Sha1WebCrypto,\n  // SHA256\n  Sha256Js,\n  Sha256Node,\n} from \"@aws-sdk/checksums/sha\";\nimport { Md5Js, Md5Node } from \"@aws-sdk/checksums/md5\";\nimport {\n  // CRC32\n  Crc32Js,\n  Crc32Node,\n  // CRC32C\n  Crc32cJs,\n  Crc32cNode,\n  //CRC32NVME\n  Crc64Nvme,\n  Crc64NvmeJs,\n} from \"@aws-sdk/checksums/crc\";\n```\n\nSha1Node, Sha256Node, and Md5Node use the `node:crypto` lib.\n\nSha1WebCrypto uses subtle crypto but falls back to JS when buffered data exceeds 8 MB.\n\nCrc32Node uses `node:zlib`.\n\nCrc64Nvme uses the AWS CRT if you load `@aws-sdk/crc64-nvme-crt`.\n\n## What does the AWS SDK do with this package?\n\nThe AWS SDK uses Sha256 for Signature V4 signing, Crc32 for event stream message integrity,\nand all other algorithms are used for data integrity checksumming.\n","publish_time":1791579227174,"_cnpm_publish_time":1791579227174,"dist-tags":{"latest":"3.1002.2"}}