@aws-sdk/hash-node
Advanced tools
Comparing version 3.25.0 to 3.29.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.29.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.28.0...v3.29.0) (2021-09-02) | ||
**Note:** Version bump only for package @aws-sdk/hash-node | ||
# [3.25.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.24.0...v3.25.0) (2021-08-05) | ||
@@ -8,0 +16,0 @@ |
@@ -9,3 +9,3 @@ "use strict"; | ||
constructor(algorithmIdentifier, secret) { | ||
this.hash = secret ? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) : crypto_1.createHash(algorithmIdentifier); | ||
this.hash = secret ? (0, crypto_1.createHmac)(algorithmIdentifier, castSourceData(secret)) : (0, crypto_1.createHash)(algorithmIdentifier); | ||
} | ||
@@ -25,9 +25,9 @@ update(toHash, encoding) { | ||
if (typeof toCast === "string") { | ||
return util_buffer_from_1.fromString(toCast, encoding); | ||
return (0, util_buffer_from_1.fromString)(toCast, encoding); | ||
} | ||
if (ArrayBuffer.isView(toCast)) { | ||
return util_buffer_from_1.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); | ||
return (0, util_buffer_from_1.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); | ||
} | ||
return util_buffer_from_1.fromArrayBuffer(toCast); | ||
return (0, util_buffer_from_1.fromArrayBuffer)(toCast); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsZ0VBQXdGO0FBQ3hGLG1DQUFnQztBQUNoQyxtQ0FBd0U7QUFFeEUsTUFBYSxJQUFJO0lBR2YsWUFBWSxtQkFBMkIsRUFBRSxNQUFtQjtRQUMxRCxJQUFJLENBQUMsSUFBS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2RpbmcpO1xuICB9XG5cbiAgaWYgKEFycmF5QnVmZmVyLmlzVmlldyh0b0Nhc3QpKSB7XG4gICAgcmV0dXJuIGZyb21BcnJheUJ1ZmZlcih0b0Nhc3QuYnVmZmVyLCB0b0Nhc3QuYnl0ZU9mZnNldCwgdG9DYXN0LmJ5dGVMZW5ndGgpO1xuICB9XG5cbiAgcmV0dXJuIGZyb21BcnJheUJ1ZmZlcih0b0Nhc3QpO1xufVxuIl19 |
{ | ||
"name": "@aws-sdk/hash-node", | ||
"version": "3.25.0", | ||
"version": "3.29.0", | ||
"scripts": { | ||
@@ -24,7 +24,7 @@ "build:cjs": "tsc -p tsconfig.cjs.json", | ||
"jest": "^26.1.0", | ||
"typescript": "~4.3.2" | ||
"typescript": "~4.4.2" | ||
}, | ||
"dependencies": { | ||
"@aws-sdk/types": "3.25.0", | ||
"@aws-sdk/util-buffer-from": "3.23.0", | ||
"@aws-sdk/types": "3.29.0", | ||
"@aws-sdk/util-buffer-from": "3.29.0", | ||
"tslib": "^2.3.0" | ||
@@ -31,0 +31,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47866
+ Added@aws-sdk/is-array-buffer@3.29.0(transitive)
+ Added@aws-sdk/types@3.29.0(transitive)
+ Added@aws-sdk/util-buffer-from@3.29.0(transitive)
- Removed@aws-sdk/is-array-buffer@3.23.0(transitive)
- Removed@aws-sdk/types@3.25.0(transitive)
- Removed@aws-sdk/util-buffer-from@3.23.0(transitive)
Updated@aws-sdk/types@3.29.0