@aws-sdk/hash-node
Advanced tools
Comparing version 1.0.0-gamma.2 to 1.0.0-gamma.3
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.0.0-gamma.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/hash-node@1.0.0-gamma.2...@aws-sdk/hash-node@1.0.0-gamma.3) (2020-07-13) | ||
### Features | ||
* add code linting and prettify ([#1350](https://github.com/aws/aws-sdk-js-v3/issues/1350)) ([47770fa](https://github.com/aws/aws-sdk-js-v3/commit/47770fa493c3405f193069cd18319882529ff484)) | ||
# [1.0.0-gamma.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/hash-node@0.1.0-preview.2...@aws-sdk/hash-node@1.0.0-gamma.2) (2020-07-08) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Hash = void 0; | ||
var util_buffer_from_1 = require("@aws-sdk/util-buffer-from"); | ||
var buffer_1 = require("buffer"); | ||
var util_buffer_from_1 = require("@aws-sdk/util-buffer-from"); | ||
var crypto_1 = require("crypto"); | ||
var Hash = /** @class */ (function () { | ||
function Hash(algorithmIdentifier, secret) { | ||
this.hash = secret | ||
? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) | ||
: crypto_1.createHash(algorithmIdentifier); | ||
this.hash = secret ? crypto_1.createHmac(algorithmIdentifier, castSourceData(secret)) : crypto_1.createHash(algorithmIdentifier); | ||
} | ||
@@ -33,2 +32,2 @@ Hash.prototype.update = function (toHash, encoding) { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxpQ0FBZ0M7QUFDaEMsOERBSW1DO0FBQ25DLGlDQUF3RTtBQUV4RTtJQUdFLGNBQVksbUJBQTJC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YXN0O1xuICB9XG5cbiAgaWYgKHR5cGVvZiB0b0Nhc3QgPT09IFwic3RyaW5nXCIpIHtcbiAgICByZXR1cm4gZnJvbVN0cmluZyh0b0Nhc3QsIGVuY29kaW5nKTtcbiAgfVxuXG4gIGlmIChBcnJheUJ1ZmZlci5pc1ZpZXcodG9DYXN0KSkge1xuICAgIHJldHVybiBmcm9tQXJyYXlCdWZmZXIodG9DYXN0LmJ1ZmZlciwgdG9DYXN0LmJ5dGVPZmZzZXQsIHRvQ2FzdC5ieXRlTGVuZ3RoKTtcbiAgfVxuXG4gIHJldHVybiBmcm9tQXJyYXlCdWZmZXIodG9DYXN0KTtcbn1cbiJdfQ== |
{ | ||
"name": "@aws-sdk/hash-node", | ||
"version": "1.0.0-gamma.2", | ||
"version": "1.0.0-gamma.3", | ||
"scripts": { | ||
@@ -24,9 +24,9 @@ "prepublishOnly": "yarn build:cjs && yarn build:es", | ||
"jest": "^26.1.0", | ||
"typescript": "~3.8.3" | ||
"typescript": "~3.9.3" | ||
}, | ||
"dependencies": { | ||
"@aws-sdk/types": "1.0.0-gamma.2", | ||
"@aws-sdk/util-buffer-from": "1.0.0-gamma.2", | ||
"@aws-sdk/types": "1.0.0-gamma.3", | ||
"@aws-sdk/util-buffer-from": "1.0.0-gamma.3", | ||
"tslib": "^1.8.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
35760
76
+ Added@aws-sdk/is-array-buffer@1.0.0-gamma.3(transitive)
+ Added@aws-sdk/types@1.0.0-gamma.3(transitive)
+ Added@aws-sdk/util-buffer-from@1.0.0-gamma.3(transitive)
- Removed@aws-sdk/is-array-buffer@1.0.0-gamma.2(transitive)
- Removed@aws-sdk/types@1.0.0-gamma.2(transitive)
- Removed@aws-sdk/util-buffer-from@1.0.0-gamma.2(transitive)
Updated@aws-sdk/types@1.0.0-gamma.3