-
Notifications
You must be signed in to change notification settings - Fork 14
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
Signature verification #334
Conversation
assertEquals( | ||
fixtures.boClient.verifySignatureWithInstallationId( | ||
"Testing", | ||
signature, | ||
alixInstallationId | ||
), true | ||
) |
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.
This feels weird that it's true? Should Bo really be able to verify if a signature was made by alix's installationId?
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.
Looks good!
} | ||
} | ||
|
||
fun verifySignatureWithInstallationId(message: String, signature: ByteArray, installationId: String): Boolean { |
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.
Sorry, I missed this when I approved. Can we rename this function to match with the ffi client?
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.
Or I can rename the fn on the client if it's confusing. I'm fine with going with the nomenclature you went with on ios.
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 think it's confusing for integrators since it's not clear that the installationId is the public key. I think it's okay for the names between the SDKs and libxmtp to differ. This isn't the first time I've strayed from the ffi naming in benefits of clarity in the sdk.
Adds the ability to verify if a signature was signed or not by a key