@aws-sdk/hash-node
Advanced tools
Comparing version 3.186.0 to 3.188.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13) | ||
**Note:** Version bump only for package @aws-sdk/hash-node | ||
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06) | ||
@@ -8,0 +16,0 @@ |
import { fromArrayBuffer, fromString } from "@aws-sdk/util-buffer-from"; | ||
import { Buffer } from "buffer"; | ||
import { createHash, createHmac } from "crypto"; | ||
var Hash = (function () { | ||
function Hash(algorithmIdentifier, secret) { | ||
export class Hash { | ||
constructor(algorithmIdentifier, secret) { | ||
this.hash = secret ? createHmac(algorithmIdentifier, castSourceData(secret)) : createHash(algorithmIdentifier); | ||
} | ||
Hash.prototype.update = function (toHash, encoding) { | ||
update(toHash, encoding) { | ||
this.hash.update(castSourceData(toHash, encoding)); | ||
}; | ||
Hash.prototype.digest = function () { | ||
} | ||
digest() { | ||
return Promise.resolve(this.hash.digest()); | ||
}; | ||
return Hash; | ||
}()); | ||
export { Hash }; | ||
} | ||
} | ||
function castSourceData(toCast, encoding) { | ||
@@ -18,0 +16,0 @@ if (Buffer.isBuffer(toCast)) { |
{ | ||
"name": "@aws-sdk/hash-node", | ||
"version": "3.186.0", | ||
"version": "3.188.0", | ||
"scripts": { | ||
@@ -33,4 +33,4 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/types": "3.186.0", | ||
"@aws-sdk/util-buffer-from": "3.186.0", | ||
"@aws-sdk/types": "3.188.0", | ||
"@aws-sdk/util-buffer-from": "3.188.0", | ||
"tslib": "^2.3.1" | ||
@@ -37,0 +37,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
45985
70
+ Added@aws-sdk/is-array-buffer@3.188.0(transitive)
+ Added@aws-sdk/types@3.188.0(transitive)
+ Added@aws-sdk/util-buffer-from@3.188.0(transitive)
- Removed@aws-sdk/is-array-buffer@3.186.0(transitive)
- Removed@aws-sdk/types@3.186.0(transitive)
- Removed@aws-sdk/util-buffer-from@3.186.0(transitive)
Updated@aws-sdk/types@3.188.0