-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
To speed up the loadProtoJSON and addressed googleapis/gax-nodejs#1196, we have temperately solution use hashobject(JSON.stringify(json)).
Because hashobject is work for both nodejs and browser( see package.json).
For long-term ultimate goal is to reduce the dependency(i.e remove hashobject). To get rid of hashobject cause breaking change. Because crypto is Node.js specific module. And to use in browser, we need window.crypto.subtle. But the digest is asynchronies function return promise.
Example in
https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/crypto/crypto.ts#L76-L81
Draft implementation PR in gax:
googleapis/gax-nodejs@0ce1a4c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.