-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Fix hashed ID server lookups with no Olm #4333
Conversation
It used the hash function from Olm (presumably to work cross-platform) but subtle crypto is available on node nowadays so we can just use that. Refactor existing code that did this out to a common function, add tests.
spec/unit/crypto/digest.spec.ts
Outdated
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.
move this out of crypto
too, please.
I don't know why the sonarcloud results aren't coming through now :/ |
*/ | ||
|
||
/** | ||
* @param plaintext The string to hash |
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.
what does it do, though?
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'd sort of assumed this was described completely by the @return param, but I can add a body too
It used the hash function from Olm (presumably to work cross-platform) but subtle crypto is available on node nowadays so we can just use that.
Refactor existing code that did this out to a common function, add tests.
Checklist
public
/exported
symbols have accurate TSDoc documentation.