@cdklabs/cdk-ecs-codedeploy 0.0.39 → 0.0.41

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 (179) hide show
  1. package/.jsii +3 -3
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  6. package/node_modules/@aws-crypto/ie11-detection/CHANGELOG.md +9 -33
  7. package/node_modules/@aws-crypto/ie11-detection/build/MsSubtleCrypto.d.ts +5 -5
  8. package/node_modules/@aws-crypto/ie11-detection/package.json +2 -2
  9. package/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md +28 -52
  10. package/node_modules/@aws-crypto/sha256-browser/README.md +11 -0
  11. package/node_modules/@aws-crypto/sha256-browser/build/constants.js +1 -1
  12. package/node_modules/@aws-crypto/sha256-browser/build/constants.js.map +1 -0
  13. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.d.ts +4 -3
  14. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js +6 -2
  15. package/node_modules/@aws-crypto/sha256-browser/build/crossPlatformSha256.js.map +1 -0
  16. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.d.ts +4 -2
  17. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js +14 -10
  18. package/node_modules/@aws-crypto/sha256-browser/build/ie11Sha256.js.map +1 -0
  19. package/node_modules/@aws-crypto/sha256-browser/build/index.js +2 -2
  20. package/node_modules/@aws-crypto/sha256-browser/build/index.js.map +1 -0
  21. package/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js +1 -1
  22. package/node_modules/@aws-crypto/sha256-browser/build/isEmptyData.js.map +1 -0
  23. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.d.ts +5 -3
  24. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js +15 -9
  25. package/node_modules/@aws-crypto/sha256-browser/build/webCryptoSha256.js.map +1 -0
  26. package/node_modules/@aws-crypto/sha256-browser/package.json +8 -7
  27. package/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts +9 -4
  28. package/node_modules/@aws-crypto/sha256-browser/src/ie11Sha256.ts +22 -16
  29. package/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts +24 -17
  30. package/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +28 -48
  31. package/node_modules/@aws-crypto/sha256-js/README.md +11 -0
  32. package/node_modules/@aws-crypto/sha256-js/build/RawSha256.js +1 -1
  33. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/RawSha256.js.map +0 -0
  34. package/node_modules/@aws-crypto/sha256-js/build/constants.js +1 -1
  35. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/constants.js.map +0 -0
  36. package/node_modules/@aws-crypto/sha256-js/build/index.js +2 -2
  37. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/index.js.map +0 -0
  38. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts +6 -4
  39. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.js +24 -19
  40. package/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map +1 -0
  41. package/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js +1 -1
  42. package/node_modules/@aws-crypto/{sha256-browser/node_modules/@aws-crypto/sha256-js → sha256-js}/build/knownHashes.fixture.js.map +0 -0
  43. package/node_modules/@aws-crypto/sha256-js/package.json +5 -4
  44. package/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +31 -23
  45. package/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md +9 -33
  46. package/node_modules/@aws-crypto/supports-web-crypto/package.json +2 -2
  47. package/node_modules/@aws-crypto/util/CHANGELOG.md +12 -29
  48. package/node_modules/@aws-crypto/util/package.json +3 -3
  49. package/node_modules/@aws-sdk/abort-controller/package.json +2 -2
  50. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/protocols/Aws_json1_1.js +2 -2
  51. package/node_modules/@aws-sdk/client-codedeploy/dist-es/protocols/Aws_json1_1.js +2 -2
  52. package/node_modules/@aws-sdk/client-codedeploy/dist-types/CodeDeployClient.d.ts +3 -3
  53. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/CodeDeployClient.d.ts +2 -1
  54. package/node_modules/@aws-sdk/client-codedeploy/package.json +32 -32
  55. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +3 -3
  56. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +2 -1
  57. package/node_modules/@aws-sdk/client-sso/package.json +28 -28
  58. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +3 -3
  59. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +2 -1
  60. package/node_modules/@aws-sdk/client-sso-oidc/package.json +28 -28
  61. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +3 -3
  62. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +2 -1
  63. package/node_modules/@aws-sdk/client-sts/package.json +31 -31
  64. package/node_modules/@aws-sdk/config-resolver/package.json +5 -5
  65. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  66. package/node_modules/@aws-sdk/credential-provider-imds/package.json +5 -5
  67. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  68. package/node_modules/@aws-sdk/credential-provider-node/package.json +10 -10
  69. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  70. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  71. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  72. package/node_modules/@aws-sdk/fetch-http-handler/package.json +5 -5
  73. package/node_modules/@aws-sdk/hash-node/dist-cjs/index.js +10 -2
  74. package/node_modules/@aws-sdk/hash-node/dist-es/index.js +10 -2
  75. package/node_modules/@aws-sdk/hash-node/dist-types/index.d.ts +6 -3
  76. package/node_modules/@aws-sdk/hash-node/dist-types/ts3.4/index.d.ts +6 -3
  77. package/node_modules/@aws-sdk/hash-node/package.json +3 -2
  78. package/node_modules/@aws-sdk/invalid-dependency/package.json +2 -2
  79. package/node_modules/@aws-sdk/middleware-content-length/package.json +3 -3
  80. package/node_modules/@aws-sdk/middleware-endpoint/package.json +7 -7
  81. package/node_modules/@aws-sdk/middleware-host-header/package.json +3 -3
  82. package/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
  83. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +3 -3
  84. package/node_modules/@aws-sdk/middleware-retry/package.json +7 -7
  85. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/index.d.ts +2 -2
  86. package/node_modules/@aws-sdk/middleware-sdk-sts/dist-types/ts3.4/index.d.ts +2 -1
  87. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +6 -6
  88. package/node_modules/@aws-sdk/middleware-serde/package.json +2 -2
  89. package/node_modules/@aws-sdk/middleware-signing/dist-types/configurations.d.ts +3 -3
  90. package/node_modules/@aws-sdk/middleware-signing/dist-types/ts3.4/configurations.d.ts +3 -2
  91. package/node_modules/@aws-sdk/middleware-signing/package.json +6 -6
  92. package/node_modules/@aws-sdk/middleware-stack/package.json +2 -2
  93. package/node_modules/@aws-sdk/middleware-user-agent/package.json +4 -4
  94. package/node_modules/@aws-sdk/node-config-provider/package.json +4 -4
  95. package/node_modules/@aws-sdk/node-http-handler/package.json +5 -5
  96. package/node_modules/@aws-sdk/property-provider/package.json +2 -2
  97. package/node_modules/@aws-sdk/protocol-http/package.json +2 -2
  98. package/node_modules/@aws-sdk/querystring-builder/package.json +2 -2
  99. package/node_modules/@aws-sdk/querystring-parser/package.json +2 -2
  100. package/node_modules/@aws-sdk/service-error-classification/package.json +2 -2
  101. package/node_modules/@aws-sdk/shared-ini-file-loader/package.json +2 -2
  102. package/node_modules/@aws-sdk/signature-v4/dist-cjs/SignatureV4.js +4 -3
  103. package/node_modules/@aws-sdk/signature-v4/dist-cjs/credentialDerivation.js +2 -1
  104. package/node_modules/@aws-sdk/signature-v4/dist-cjs/getPayloadHash.js +2 -1
  105. package/node_modules/@aws-sdk/signature-v4/dist-es/SignatureV4.js +4 -3
  106. package/node_modules/@aws-sdk/signature-v4/dist-es/credentialDerivation.js +2 -1
  107. package/node_modules/@aws-sdk/signature-v4/dist-es/getPayloadHash.js +2 -1
  108. package/node_modules/@aws-sdk/signature-v4/dist-types/SignatureV4.d.ts +3 -3
  109. package/node_modules/@aws-sdk/signature-v4/dist-types/credentialDerivation.d.ts +2 -2
  110. package/node_modules/@aws-sdk/signature-v4/dist-types/getPayloadHash.d.ts +2 -2
  111. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/SignatureV4.d.ts +3 -2
  112. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/credentialDerivation.d.ts +6 -2
  113. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/getPayloadHash.d.ts +6 -2
  114. package/node_modules/@aws-sdk/signature-v4/package.json +6 -5
  115. package/node_modules/@aws-sdk/smithy-client/package.json +3 -3
  116. package/node_modules/@aws-sdk/token-providers/package.json +5 -5
  117. package/node_modules/@aws-sdk/types/dist-types/checksum.d.ts +9 -0
  118. package/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +2 -0
  119. package/node_modules/@aws-sdk/types/dist-types/stream.d.ts +2 -1
  120. package/node_modules/@aws-sdk/types/dist-types/ts3.4/checksum.d.ts +4 -0
  121. package/node_modules/@aws-sdk/types/dist-types/ts3.4/stream.d.ts +2 -1
  122. package/node_modules/@aws-sdk/types/package.json +1 -1
  123. package/node_modules/@aws-sdk/url-parser/package.json +3 -3
  124. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +4 -4
  125. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +7 -7
  126. package/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
  127. package/node_modules/@aws-sdk/util-middleware/package.json +2 -2
  128. package/node_modules/@aws-sdk/util-retry/package.json +3 -3
  129. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  130. package/node_modules/@aws-sdk/util-user-agent-node/package.json +4 -4
  131. package/node_modules/{@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js → @aws-sdk/util-utf8}/LICENSE +1 -1
  132. package/node_modules/@aws-sdk/util-utf8/README.md +4 -0
  133. package/node_modules/@aws-sdk/util-utf8/dist-cjs/fromUtf8.browser.js +5 -0
  134. package/node_modules/@aws-sdk/util-utf8/dist-cjs/fromUtf8.js +9 -0
  135. package/node_modules/@aws-sdk/util-utf8/dist-cjs/index.js +6 -0
  136. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUint8Array.js +14 -0
  137. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUtf8.browser.js +5 -0
  138. package/node_modules/@aws-sdk/util-utf8/dist-cjs/toUtf8.js +6 -0
  139. package/node_modules/@aws-sdk/util-utf8/dist-es/fromUtf8.browser.js +1 -0
  140. package/node_modules/@aws-sdk/util-utf8/dist-es/fromUtf8.js +5 -0
  141. package/node_modules/@aws-sdk/util-utf8/dist-es/index.js +3 -0
  142. package/node_modules/@aws-sdk/util-utf8/dist-es/toUint8Array.js +10 -0
  143. package/node_modules/@aws-sdk/util-utf8/dist-es/toUtf8.browser.js +1 -0
  144. package/node_modules/@aws-sdk/util-utf8/dist-es/toUtf8.js +2 -0
  145. package/node_modules/@aws-sdk/util-utf8/dist-types/fromUtf8.browser.d.ts +1 -0
  146. package/node_modules/@aws-sdk/util-utf8/dist-types/fromUtf8.d.ts +1 -0
  147. package/node_modules/@aws-sdk/util-utf8/dist-types/index.d.ts +3 -0
  148. package/node_modules/@aws-sdk/util-utf8/dist-types/toUint8Array.d.ts +1 -0
  149. package/node_modules/@aws-sdk/util-utf8/dist-types/toUtf8.browser.d.ts +1 -0
  150. package/node_modules/@aws-sdk/util-utf8/dist-types/toUtf8.d.ts +1 -0
  151. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts +1 -0
  152. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/fromUtf8.d.ts +1 -0
  153. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/index.d.ts +3 -0
  154. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUint8Array.d.ts +3 -0
  155. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts +1 -0
  156. package/node_modules/@aws-sdk/util-utf8/dist-types/ts3.4/toUtf8.d.ts +1 -0
  157. package/node_modules/@aws-sdk/util-utf8/package.json +62 -0
  158. package/node_modules/@aws-sdk/util-waiter/package.json +3 -3
  159. package/package.json +6 -6
  160. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +0 -125
  161. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/README.md +0 -18
  162. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/RawSha256.d.ts +0 -17
  163. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/RawSha256.js +0 -124
  164. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/constants.d.ts +0 -20
  165. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/constants.js +0 -98
  166. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/index.d.ts +0 -1
  167. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/index.js +0 -5
  168. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.d.ts +0 -10
  169. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.js +0 -80
  170. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/jsSha256.js.map +0 -1
  171. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.d.ts +0 -5
  172. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/build/knownHashes.fixture.js +0 -322
  173. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/package.json +0 -28
  174. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts +0 -164
  175. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/constants.ts +0 -98
  176. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/index.ts +0 -1
  177. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +0 -86
  178. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts +0 -401
  179. package/node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js/tsconfig.json +0 -17
@@ -1,322 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hmacTestVectors = exports.hashTestVectors = void 0;
4
- var util_hex_encoding_1 = require("@aws-sdk/util-hex-encoding");
5
- var millionChars = new Uint8Array(1000000);
6
- for (var i = 0; i < 1000000; i++) {
7
- millionChars[i] = 97;
8
- }
9
- exports.hashTestVectors = [
10
- [
11
- Uint8Array.from([97, 98, 99]),
12
- (0, util_hex_encoding_1.fromHex)("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad")
13
- ],
14
- [
15
- new Uint8Array(0),
16
- (0, util_hex_encoding_1.fromHex)("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")
17
- ],
18
- [
19
- (0, util_hex_encoding_1.fromHex)("61"),
20
- (0, util_hex_encoding_1.fromHex)("ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb")
21
- ],
22
- [
23
- (0, util_hex_encoding_1.fromHex)("6161"),
24
- (0, util_hex_encoding_1.fromHex)("961b6dd3ede3cb8ecbaacbd68de040cd78eb2ed5889130cceb4c49268ea4d506")
25
- ],
26
- [
27
- (0, util_hex_encoding_1.fromHex)("616161"),
28
- (0, util_hex_encoding_1.fromHex)("9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0")
29
- ],
30
- [
31
- (0, util_hex_encoding_1.fromHex)("61616161"),
32
- (0, util_hex_encoding_1.fromHex)("61be55a8e2f6b4e172338bddf184d6dbee29c98853e0a0485ecee7f27b9af0b4")
33
- ],
34
- [
35
- (0, util_hex_encoding_1.fromHex)("6161616161"),
36
- (0, util_hex_encoding_1.fromHex)("ed968e840d10d2d313a870bc131a4e2c311d7ad09bdf32b3418147221f51a6e2")
37
- ],
38
- [
39
- (0, util_hex_encoding_1.fromHex)("616161616161"),
40
- (0, util_hex_encoding_1.fromHex)("ed02457b5c41d964dbd2f2a609d63fe1bb7528dbe55e1abf5b52c249cd735797")
41
- ],
42
- [
43
- (0, util_hex_encoding_1.fromHex)("61616161616161"),
44
- (0, util_hex_encoding_1.fromHex)("e46240714b5db3a23eee60479a623efba4d633d27fe4f03c904b9e219a7fbe60")
45
- ],
46
- [
47
- (0, util_hex_encoding_1.fromHex)("6161616161616161"),
48
- (0, util_hex_encoding_1.fromHex)("1f3ce40415a2081fa3eee75fc39fff8e56c22270d1a978a7249b592dcebd20b4")
49
- ],
50
- [
51
- (0, util_hex_encoding_1.fromHex)("616161616161616161"),
52
- (0, util_hex_encoding_1.fromHex)("f2aca93b80cae681221f0445fa4e2cae8a1f9f8fa1e1741d9639caad222f537d")
53
- ],
54
- [
55
- (0, util_hex_encoding_1.fromHex)("61616161616161616161"),
56
- (0, util_hex_encoding_1.fromHex)("bf2cb58a68f684d95a3b78ef8f661c9a4e5b09e82cc8f9cc88cce90528caeb27")
57
- ],
58
- [
59
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161"),
60
- (0, util_hex_encoding_1.fromHex)("28cb017dfc99073aa1b47c1b30f413e3ce774c4991eb4158de50f9dbb36d8043")
61
- ],
62
- [
63
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161"),
64
- (0, util_hex_encoding_1.fromHex)("f24abc34b13fade76e805799f71187da6cd90b9cac373ae65ed57f143bd664e5")
65
- ],
66
- [
67
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161"),
68
- (0, util_hex_encoding_1.fromHex)("a689d786e81340e45511dec6c7ab2d978434e5db123362450fe10cfac70d19d0")
69
- ],
70
- [
71
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161"),
72
- (0, util_hex_encoding_1.fromHex)("82cab7df0abfb9d95dca4e5937ce2968c798c726fea48c016bf9763221efda13")
73
- ],
74
- [
75
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161"),
76
- (0, util_hex_encoding_1.fromHex)("ef2df0b539c6c23de0f4cbe42648c301ae0e22e887340a4599fb4ef4e2678e48")
77
- ],
78
- [
79
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161"),
80
- (0, util_hex_encoding_1.fromHex)("0c0beacef8877bbf2416eb00f2b5dc96354e26dd1df5517320459b1236860f8c")
81
- ],
82
- [
83
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161"),
84
- (0, util_hex_encoding_1.fromHex)("b860666ee2966dd8f903be44ee605c6e1366f926d9f17a8f49937d11624eb99d")
85
- ],
86
- [
87
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161"),
88
- (0, util_hex_encoding_1.fromHex)("c926defaaa3d13eda2fc63a553bb7fb7326bece6e7cb67ca5296e4727d89bab4")
89
- ],
90
- [
91
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161"),
92
- (0, util_hex_encoding_1.fromHex)("a0b4aaab8a966e2193ba172d68162c4656860197f256b5f45f0203397ff3f99c")
93
- ],
94
- [
95
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161"),
96
- (0, util_hex_encoding_1.fromHex)("42492da06234ad0ac76f5d5debdb6d1ae027cffbe746a1c13b89bb8bc0139137")
97
- ],
98
- [
99
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161"),
100
- (0, util_hex_encoding_1.fromHex)("7df8e299c834de198e264c3e374bc58ecd9382252a705c183beb02f275571e3b")
101
- ],
102
- [
103
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161"),
104
- (0, util_hex_encoding_1.fromHex)("ec7c494df6d2a7ea36668d656e6b8979e33641bfea378c15038af3964db057a3")
105
- ],
106
- [
107
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161"),
108
- (0, util_hex_encoding_1.fromHex)("897d3e95b65f26676081f8b9f3a98b6ee4424566303e8d4e7c7522ebae219eab")
109
- ],
110
- [
111
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161"),
112
- (0, util_hex_encoding_1.fromHex)("09f61f8d9cd65e6a0c258087c485b6293541364e42bd97b2d7936580c8aa3c54")
113
- ],
114
- [
115
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161"),
116
- (0, util_hex_encoding_1.fromHex)("2f521e2a7d0bd812cbc035f4ed6806eb8d851793b04ba147e8f66b72f5d1f20f")
117
- ],
118
- [
119
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161"),
120
- (0, util_hex_encoding_1.fromHex)("9976d549a25115dab4e36d0c1fb8f31cb07da87dd83275977360eb7dc09e88de")
121
- ],
122
- [
123
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161"),
124
- (0, util_hex_encoding_1.fromHex)("cc0616e61cbd6e8e5e34e9fb2d320f37de915820206f5696c31f1fbd24aa16de")
125
- ],
126
- [
127
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161"),
128
- (0, util_hex_encoding_1.fromHex)("9c547cb8115a44883b9f70ba68f75117cd55359c92611875e386f8af98c172ab")
129
- ],
130
- [
131
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161"),
132
- (0, util_hex_encoding_1.fromHex)("6913c9c7fd42fe23df8b6bcd4dbaf1c17748948d97f2980b432319c39eddcf6c")
133
- ],
134
- [
135
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161"),
136
- (0, util_hex_encoding_1.fromHex)("3a54fc0cbc0b0ef48b6507b7788096235d10292dd3ae24e22f5aa062d4f9864a")
137
- ],
138
- [
139
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161"),
140
- (0, util_hex_encoding_1.fromHex)("61c60b487d1a921e0bcc9bf853dda0fb159b30bf57b2e2d2c753b00be15b5a09")
141
- ],
142
- [
143
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161"),
144
- (0, util_hex_encoding_1.fromHex)("3ba3f5f43b92602683c19aee62a20342b084dd5971ddd33808d81a328879a547")
145
- ],
146
- [
147
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161"),
148
- (0, util_hex_encoding_1.fromHex)("852785c805c77e71a22340a54e9d95933ed49121e7d2bf3c2d358854bc1359ea")
149
- ],
150
- [
151
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161"),
152
- (0, util_hex_encoding_1.fromHex)("a27c896c4859204843166af66f0e902b9c3b3ed6d2fd13d435abc020065c526f")
153
- ],
154
- [
155
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161"),
156
- (0, util_hex_encoding_1.fromHex)("629362afc62c74497caed2272e30f8125ecd0965f8d8d7cfc4e260f7f8dd319d")
157
- ],
158
- [
159
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161"),
160
- (0, util_hex_encoding_1.fromHex)("22c1d24bcd03e9aee9832efccd6da613fc702793178e5f12c945c7b67ddda933")
161
- ],
162
- [
163
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161"),
164
- (0, util_hex_encoding_1.fromHex)("21ec055b38ce759cd4d0f477e9bdec2c5b8199945db4439bae334a964df6246c")
165
- ],
166
- [
167
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161"),
168
- (0, util_hex_encoding_1.fromHex)("365a9c3e2c2af0a56e47a9dac51c2c5381bf8f41273bad3175e0e619126ad087")
169
- ],
170
- [
171
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161"),
172
- (0, util_hex_encoding_1.fromHex)("b4d5e56e929ba4cda349e9274e3603d0be246b82016bca20f363963c5f2d6845")
173
- ],
174
- [
175
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161"),
176
- (0, util_hex_encoding_1.fromHex)("e33cdf9c7f7120b98e8c78408953e07f2ecd183006b5606df349b4c212acf43e")
177
- ],
178
- [
179
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
180
- (0, util_hex_encoding_1.fromHex)("c0f8bd4dbc2b0c03107c1c37913f2a7501f521467f45dd0fef6958e9a4692719")
181
- ],
182
- [
183
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
184
- (0, util_hex_encoding_1.fromHex)("7a538607fdaab9296995929f451565bbb8142e1844117322aafd2b3d76b01aff")
185
- ],
186
- [
187
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
188
- (0, util_hex_encoding_1.fromHex)("66d34fba71f8f450f7e45598853e53bfc23bbd129027cbb131a2f4ffd7878cd0")
189
- ],
190
- [
191
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
192
- (0, util_hex_encoding_1.fromHex)("16849877c6c21ef0bfa68e4f6747300ddb171b170b9f00e189edc4c2fc4db93e")
193
- ],
194
- [
195
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
196
- (0, util_hex_encoding_1.fromHex)("52789e3423b72beeb898456a4f49662e46b0cbb960784c5ef4b1399d327e7c27")
197
- ],
198
- [
199
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
200
- (0, util_hex_encoding_1.fromHex)("6643110c5628fff59edf76d82d5bf573bf800f16a4d65dfb1e5d6f1a46296d0b")
201
- ],
202
- [
203
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
204
- (0, util_hex_encoding_1.fromHex)("11eaed932c6c6fddfc2efc394e609facf4abe814fc6180d03b14fce13a07d0e5")
205
- ],
206
- [
207
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
208
- (0, util_hex_encoding_1.fromHex)("97daac0ee9998dfcad6c9c0970da5ca411c86233a944c25b47566f6a7bc1ddd5")
209
- ],
210
- [
211
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
212
- (0, util_hex_encoding_1.fromHex)("8f9bec6a62dd28ebd36d1227745592de6658b36974a3bb98a4c582f683ea6c42")
213
- ],
214
- [
215
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
216
- (0, util_hex_encoding_1.fromHex)("160b4e433e384e05e537dc59b467f7cb2403f0214db15c5db58862a3f1156d2e")
217
- ],
218
- [
219
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
220
- (0, util_hex_encoding_1.fromHex)("bfc5fe0e360152ca98c50fab4ed7e3078c17debc2917740d5000913b686ca129")
221
- ],
222
- [
223
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
224
- (0, util_hex_encoding_1.fromHex)("6c1b3dc7a706b9dc81352a6716b9c666c608d8626272c64b914ab05572fc6e84")
225
- ],
226
- [
227
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
228
- (0, util_hex_encoding_1.fromHex)("abe346a7259fc90b4c27185419628e5e6af6466b1ae9b5446cac4bfc26cf05c4")
229
- ],
230
- [
231
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
232
- (0, util_hex_encoding_1.fromHex)("a3f01b6939256127582ac8ae9fb47a382a244680806a3f613a118851c1ca1d47")
233
- ],
234
- [
235
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
236
- (0, util_hex_encoding_1.fromHex)("9f4390f8d30c2dd92ec9f095b65e2b9ae9b0a925a5258e241c9f1e910f734318")
237
- ],
238
- [
239
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
240
- (0, util_hex_encoding_1.fromHex)("b35439a4ac6f0948b6d6f9e3c6af0f5f590ce20f1bde7090ef7970686ec6738a")
241
- ],
242
- [
243
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
244
- (0, util_hex_encoding_1.fromHex)("f13b2d724659eb3bf47f2dd6af1accc87b81f09f59f2b75e5c0bed6589dfe8c6")
245
- ],
246
- [
247
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
248
- (0, util_hex_encoding_1.fromHex)("d5c039b748aa64665782974ec3dc3025c042edf54dcdc2b5de31385b094cb678")
249
- ],
250
- [
251
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
252
- (0, util_hex_encoding_1.fromHex)("111bb261277afd65f0744b247cd3e47d386d71563d0ed995517807d5ebd4fba3")
253
- ],
254
- [
255
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
256
- (0, util_hex_encoding_1.fromHex)("11ee391211c6256460b6ed375957fadd8061cafbb31daf967db875aebd5aaad4")
257
- ],
258
- [
259
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
260
- (0, util_hex_encoding_1.fromHex)("35d5fc17cfbbadd00f5e710ada39f194c5ad7c766ad67072245f1fad45f0f530")
261
- ],
262
- [
263
- (0, util_hex_encoding_1.fromHex)("6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
264
- (0, util_hex_encoding_1.fromHex)("f506898cc7c2e092f9eb9fadae7ba50383f5b46a2a4fe5597dbb553a78981268")
265
- ],
266
- [
267
- (0, util_hex_encoding_1.fromHex)("616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
268
- (0, util_hex_encoding_1.fromHex)("7d3e74a05d7db15bce4ad9ec0658ea98e3f06eeecf16b4c6fff2da457ddc2f34")
269
- ],
270
- [
271
- (0, util_hex_encoding_1.fromHex)("61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161"),
272
- (0, util_hex_encoding_1.fromHex)("ffe054fe7ae0cb6dc65c3af9b61d5209f439851db43d0ba5997337df154668eb")
273
- ],
274
- [
275
- (0, util_hex_encoding_1.fromHex)("de188941a3375d3a8a061e67576e926dc71a7fa3f0cceb97452b4d3227965f9ea8cc75076d9fb9c5417aa5cb30fc22198b34982dbb629e"),
276
- (0, util_hex_encoding_1.fromHex)("038051e9c324393bd1ca1978dd0952c2aa3742ca4f1bd5cd4611cea83892d382")
277
- ],
278
- [
279
- millionChars,
280
- (0, util_hex_encoding_1.fromHex)("cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0")
281
- ],
282
- [
283
- (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
284
- (0, util_hex_encoding_1.fromHex)("45ad4b37c6e2fc0a2cfcc1b5da524132ec707615c2cae1dbbc43c97aa521db81")
285
- ]
286
- ];
287
- /**
288
- * @see https://tools.ietf.org/html/rfc4231
289
- */
290
- exports.hmacTestVectors = [
291
- [
292
- (0, util_hex_encoding_1.fromHex)("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"),
293
- (0, util_hex_encoding_1.fromHex)("4869205468657265"),
294
- (0, util_hex_encoding_1.fromHex)("b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7")
295
- ],
296
- [
297
- (0, util_hex_encoding_1.fromHex)("4a656665"),
298
- (0, util_hex_encoding_1.fromHex)("7768617420646f2079612077616e7420666f72206e6f7468696e673f"),
299
- (0, util_hex_encoding_1.fromHex)("5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843")
300
- ],
301
- [
302
- (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
303
- (0, util_hex_encoding_1.fromHex)("dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"),
304
- (0, util_hex_encoding_1.fromHex)("773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe")
305
- ],
306
- [
307
- (0, util_hex_encoding_1.fromHex)("0102030405060708090a0b0c0d0e0f10111213141516171819"),
308
- (0, util_hex_encoding_1.fromHex)("cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"),
309
- (0, util_hex_encoding_1.fromHex)("82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b")
310
- ],
311
- [
312
- (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
313
- (0, util_hex_encoding_1.fromHex)("54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a65204b6579202d2048617368204b6579204669727374"),
314
- (0, util_hex_encoding_1.fromHex)("60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54")
315
- ],
316
- [
317
- (0, util_hex_encoding_1.fromHex)("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"),
318
- (0, util_hex_encoding_1.fromHex)("5468697320697320612074657374207573696e672061206c6172676572207468616e20626c6f636b2d73697a65206b657920616e642061206c6172676572207468616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565647320746f20626520686173686564206265666f7265206265696e6720757365642062792074686520484d414320616c676f726974686d2e"),
319
- (0, util_hex_encoding_1.fromHex)("9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2")
320
- ]
321
- ];
322
- //# sourceMappingURL=knownHashes.fixture.js.map
@@ -1,28 +0,0 @@
1
- {
2
- "name": "@aws-crypto/sha256-js",
3
- "version": "2.0.2",
4
- "scripts": {
5
- "prepublishOnly": "tsc",
6
- "pretest": "tsc -p tsconfig.test.json",
7
- "test": "mocha --require ts-node/register test/**/*test.ts"
8
- },
9
- "main": "./build/index.js",
10
- "types": "./build/index.d.ts",
11
- "repository": {
12
- "type": "git",
13
- "url": "git@github.com:aws/aws-sdk-js-crypto-helpers.git"
14
- },
15
- "author": {
16
- "name": "AWS Crypto Tools Team",
17
- "email": "aws-cryptools@amazon.com",
18
- "url": "https://docs.aws.amazon.com/aws-crypto-tools/index.html?id=docs_gateway#lang/en_us"
19
- },
20
- "homepage": "https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/sha256-js",
21
- "license": "Apache-2.0",
22
- "dependencies": {
23
- "@aws-crypto/util": "^2.0.2",
24
- "@aws-sdk/types": "^3.110.0",
25
- "tslib": "^1.11.1"
26
- },
27
- "gitHead": "5d1db32bb75010cbe38ff8dda9c560cdbb7ec578"
28
- }
@@ -1,164 +0,0 @@
1
- import {
2
- BLOCK_SIZE,
3
- DIGEST_LENGTH,
4
- INIT,
5
- KEY,
6
- MAX_HASHABLE_LENGTH
7
- } from "./constants";
8
-
9
- /**
10
- * @internal
11
- */
12
- export class RawSha256 {
13
- private state: Int32Array = Int32Array.from(INIT);
14
- private temp: Int32Array = new Int32Array(64);
15
- private buffer: Uint8Array = new Uint8Array(64);
16
- private bufferLength: number = 0;
17
- private bytesHashed: number = 0;
18
-
19
- /**
20
- * @internal
21
- */
22
- finished: boolean = false;
23
-
24
- update(data: Uint8Array): void {
25
- if (this.finished) {
26
- throw new Error("Attempted to update an already finished hash.");
27
- }
28
-
29
- let position = 0;
30
- let { byteLength } = data;
31
- this.bytesHashed += byteLength;
32
-
33
- if (this.bytesHashed * 8 > MAX_HASHABLE_LENGTH) {
34
- throw new Error("Cannot hash more than 2^53 - 1 bits");
35
- }
36
-
37
- while (byteLength > 0) {
38
- this.buffer[this.bufferLength++] = data[position++];
39
- byteLength--;
40
-
41
- if (this.bufferLength === BLOCK_SIZE) {
42
- this.hashBuffer();
43
- this.bufferLength = 0;
44
- }
45
- }
46
- }
47
-
48
- digest(): Uint8Array {
49
- if (!this.finished) {
50
- const bitsHashed = this.bytesHashed * 8;
51
- const bufferView = new DataView(
52
- this.buffer.buffer,
53
- this.buffer.byteOffset,
54
- this.buffer.byteLength
55
- );
56
-
57
- const undecoratedLength = this.bufferLength;
58
- bufferView.setUint8(this.bufferLength++, 0x80);
59
-
60
- // Ensure the final block has enough room for the hashed length
61
- if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {
62
- for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {
63
- bufferView.setUint8(i, 0);
64
- }
65
- this.hashBuffer();
66
- this.bufferLength = 0;
67
- }
68
-
69
- for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {
70
- bufferView.setUint8(i, 0);
71
- }
72
- bufferView.setUint32(
73
- BLOCK_SIZE - 8,
74
- Math.floor(bitsHashed / 0x100000000),
75
- true
76
- );
77
- bufferView.setUint32(BLOCK_SIZE - 4, bitsHashed);
78
-
79
- this.hashBuffer();
80
-
81
- this.finished = true;
82
- }
83
-
84
- // The value in state is little-endian rather than big-endian, so flip
85
- // each word into a new Uint8Array
86
- const out = new Uint8Array(DIGEST_LENGTH);
87
- for (let i = 0; i < 8; i++) {
88
- out[i * 4] = (this.state[i] >>> 24) & 0xff;
89
- out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;
90
- out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;
91
- out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;
92
- }
93
-
94
- return out;
95
- }
96
-
97
- private hashBuffer(): void {
98
- const { buffer, state } = this;
99
-
100
- let state0 = state[0],
101
- state1 = state[1],
102
- state2 = state[2],
103
- state3 = state[3],
104
- state4 = state[4],
105
- state5 = state[5],
106
- state6 = state[6],
107
- state7 = state[7];
108
-
109
- for (let i = 0; i < BLOCK_SIZE; i++) {
110
- if (i < 16) {
111
- this.temp[i] =
112
- ((buffer[i * 4] & 0xff) << 24) |
113
- ((buffer[i * 4 + 1] & 0xff) << 16) |
114
- ((buffer[i * 4 + 2] & 0xff) << 8) |
115
- (buffer[i * 4 + 3] & 0xff);
116
- } else {
117
- let u = this.temp[i - 2];
118
- const t1 =
119
- ((u >>> 17) | (u << 15)) ^ ((u >>> 19) | (u << 13)) ^ (u >>> 10);
120
-
121
- u = this.temp[i - 15];
122
- const t2 =
123
- ((u >>> 7) | (u << 25)) ^ ((u >>> 18) | (u << 14)) ^ (u >>> 3);
124
-
125
- this.temp[i] =
126
- ((t1 + this.temp[i - 7]) | 0) + ((t2 + this.temp[i - 16]) | 0);
127
- }
128
-
129
- const t1 =
130
- ((((((state4 >>> 6) | (state4 << 26)) ^
131
- ((state4 >>> 11) | (state4 << 21)) ^
132
- ((state4 >>> 25) | (state4 << 7))) +
133
- ((state4 & state5) ^ (~state4 & state6))) |
134
- 0) +
135
- ((state7 + ((KEY[i] + this.temp[i]) | 0)) | 0)) |
136
- 0;
137
-
138
- const t2 =
139
- ((((state0 >>> 2) | (state0 << 30)) ^
140
- ((state0 >>> 13) | (state0 << 19)) ^
141
- ((state0 >>> 22) | (state0 << 10))) +
142
- ((state0 & state1) ^ (state0 & state2) ^ (state1 & state2))) |
143
- 0;
144
-
145
- state7 = state6;
146
- state6 = state5;
147
- state5 = state4;
148
- state4 = (state3 + t1) | 0;
149
- state3 = state2;
150
- state2 = state1;
151
- state1 = state0;
152
- state0 = (t1 + t2) | 0;
153
- }
154
-
155
- state[0] += state0;
156
- state[1] += state1;
157
- state[2] += state2;
158
- state[3] += state3;
159
- state[4] += state4;
160
- state[5] += state5;
161
- state[6] += state6;
162
- state[7] += state7;
163
- }
164
- }
@@ -1,98 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export const BLOCK_SIZE: number = 64;
5
-
6
- /**
7
- * @internal
8
- */
9
- export const DIGEST_LENGTH: number = 32;
10
-
11
- /**
12
- * @internal
13
- */
14
- export const KEY = new Uint32Array([
15
- 0x428a2f98,
16
- 0x71374491,
17
- 0xb5c0fbcf,
18
- 0xe9b5dba5,
19
- 0x3956c25b,
20
- 0x59f111f1,
21
- 0x923f82a4,
22
- 0xab1c5ed5,
23
- 0xd807aa98,
24
- 0x12835b01,
25
- 0x243185be,
26
- 0x550c7dc3,
27
- 0x72be5d74,
28
- 0x80deb1fe,
29
- 0x9bdc06a7,
30
- 0xc19bf174,
31
- 0xe49b69c1,
32
- 0xefbe4786,
33
- 0x0fc19dc6,
34
- 0x240ca1cc,
35
- 0x2de92c6f,
36
- 0x4a7484aa,
37
- 0x5cb0a9dc,
38
- 0x76f988da,
39
- 0x983e5152,
40
- 0xa831c66d,
41
- 0xb00327c8,
42
- 0xbf597fc7,
43
- 0xc6e00bf3,
44
- 0xd5a79147,
45
- 0x06ca6351,
46
- 0x14292967,
47
- 0x27b70a85,
48
- 0x2e1b2138,
49
- 0x4d2c6dfc,
50
- 0x53380d13,
51
- 0x650a7354,
52
- 0x766a0abb,
53
- 0x81c2c92e,
54
- 0x92722c85,
55
- 0xa2bfe8a1,
56
- 0xa81a664b,
57
- 0xc24b8b70,
58
- 0xc76c51a3,
59
- 0xd192e819,
60
- 0xd6990624,
61
- 0xf40e3585,
62
- 0x106aa070,
63
- 0x19a4c116,
64
- 0x1e376c08,
65
- 0x2748774c,
66
- 0x34b0bcb5,
67
- 0x391c0cb3,
68
- 0x4ed8aa4a,
69
- 0x5b9cca4f,
70
- 0x682e6ff3,
71
- 0x748f82ee,
72
- 0x78a5636f,
73
- 0x84c87814,
74
- 0x8cc70208,
75
- 0x90befffa,
76
- 0xa4506ceb,
77
- 0xbef9a3f7,
78
- 0xc67178f2
79
- ]);
80
-
81
- /**
82
- * @internal
83
- */
84
- export const INIT = [
85
- 0x6a09e667,
86
- 0xbb67ae85,
87
- 0x3c6ef372,
88
- 0xa54ff53a,
89
- 0x510e527f,
90
- 0x9b05688c,
91
- 0x1f83d9ab,
92
- 0x5be0cd19
93
- ];
94
-
95
- /**
96
- * @internal
97
- */
98
- export const MAX_HASHABLE_LENGTH = 2 ** 53 - 1;