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

Android and C# getHashSha256 Difference #14

Open
mrtcn opened this issue May 28, 2015 · 1 comment
Open

Android and C# getHashSha256 Difference #14

mrtcn opened this issue May 28, 2015 · 1 comment

Comments

@mrtcn
Copy link

mrtcn commented May 28, 2015

First of all thanks for the great library
This is actually not a big issue but on how to use section

Android hashes the key as follows;
string key = CryptLib.getHashSha256("my secret key", 31);
C# hashes as follows;
String key = CryptLib.SHA256("my secret key", 32); //32 bytes = 256 bit

Which gave us at the beginning different results then I have changed the C# code to use 32bytes and results were identical.

@navneet83
Copy link
Owner

Thanks for reporting this one! I'll test and fix the code accordingly.

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

2 participants