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

Error: Unsupported schema version 2 #20

Closed
AzriDelta opened this issue Sep 29, 2018 · 8 comments
Closed

Error: Unsupported schema version 2 #20

AzriDelta opened this issue Sep 29, 2018 · 8 comments

Comments

@AzriDelta
Copy link

Hello.

When decrypting the string which is already in base64, I encountered this error.

Sample of my code:

var password = "password";
var encrypted_username = "AgG0hYmf7iEEEsZRb213DFX65Uoe7iiwwDG6VWsC3+WuFBknZRWWnSzyoUHZkAlOgA3G6s4pukD8R6s9ErWsypAGA2xQRrLwjXJ0YXtaaxkjog=="

var decrypted_username = RNCryptor.Decrypt(encrypted_username, password);
console.log("Decrypted username:", decrypted_username.toString());

Even using Buffer is not working, and return the same error.

@chesstrian
Copy link
Owner

Hi @AzriDelta, I only implemented version 3 and decided to wait for an issue like this, I think it's better to use version 3 but if you really need to work with version 2, please let me know and I will get some time to implement it.

@AzriDelta
Copy link
Author

Yes, I really need to use version 2, as I encrypt my data on Android device using this library https://github.com/TGIO/RNCryptorNative

@chesstrian
Copy link
Owner

The library you mention seems to support version 3, why do you want to stick to version 2?.

@chesstrian
Copy link
Owner

My bad, the library does not support version 3, it's available in a PR: TGIO/RNCryptorNative#13

I highly recommend using version 3 instead, let me know if this works for you, otherwise I will dedicate some time to version 2 for NodeJS.

@AzriDelta
Copy link
Author

Hello @chesstrian. I have tried in the past 2 weeks impelementing the PR branch (https://github.com/hoanghiephui/RNCryptorNative) that supposedly manage to use version 3, but with no success (ran into an error that cannot be solved).

@ravindragupta90
Copy link

@AzriDelta Did u managed to solve the issue or changed the library?

@AzriDelta
Copy link
Author

@ravindragupta90 no I did not manage to solve it. I changed to another library.

@chesstrian
Copy link
Owner

Version 2 not implemented at the end, will be checking if version 4 of the algorithm can be implemented.

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

3 participants