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