Skip to content
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

Inconsistent parameter order #155

Open
raphaelheinz opened this issue May 19, 2023 · 0 comments
Open

Inconsistent parameter order #155

raphaelheinz opened this issue May 19, 2023 · 0 comments

Comments

@raphaelheinz
Copy link

Be careful when using verify64WithAlgorithm! Order of signature and message parameters is inconsistent between Android and iOS. This results in a rejected signature.

A quick solution is to check the platform, but this should be fixed in the next version....

if (Platform.OS === 'android') {
    isValid = await RSA.verify64WithAlgorithm(signature, message, this.key.public, this.algorithm);
} else if (Platform.OS === 'ios') {
    isValid = await RSA.verify64WithAlgorithm(message, signature, this.key.public, this.algorithm);
}

Environment:
[email protected]
[email protected]
[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant