-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update Hash implementations with Checksum interface #492
Conversation
80f7d3c
to
678563e
Compare
import { Hash as SdkNodeHash } from "@aws-sdk/hash-node"; | ||
|
||
// TODO: remove the following when SdkNodeHash has implemented Checksum interface in aws-sdk-js-v3 | ||
export class NodeHash implements Checksum { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is circular dependency between the aws-sdk-js-crypto-helpers
and aws-js-sdk-v3
.
@aws-sdk/hash-node
's Hash
implementation needs to be updated to use Checksum
interface after this PR is merged, then this class will be removed afterwards.
678563e
to
295e06c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some code style suggestions.
Otherwise, I have two blocking questions.
- Does a circular dependency already exist? If not, I would like to avoid it.
- I am generally against creating a field that holds priveldged information unless strictly neccesary. For the
sha
packages, I think it may be possible to avoid creating thesecret
field and still implementreset
. It may even be possible to avoid repeat code...
I am requesting changes for the test imports.
Have you tried abstracting the reset
and constructor
logic
in the Sha packages such that we can avoid secret
and repeat code?
Yes the circular dependency has already existed prior to this change. |
ea507d6
to
4ecc4ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid ts-ignore
at all costs.
In this case, we can tell TypeScript we will assign a value to operation.
(It's surprising that TypeScript cannot figure that out on it's own.
Dafny can, or at least provides a method to annotate the code such that it can.)
All blockiing issues have been resolved
Description of changes:
Related issue #485
This PR updates Hash implementations with Checksum interface.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.