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

Nodejs crypto OpenSSL version #1

Closed
shaunwarman opened this issue Jan 28, 2016 · 2 comments
Closed

Nodejs crypto OpenSSL version #1

shaunwarman opened this issue Jan 28, 2016 · 2 comments

Comments

@shaunwarman
Copy link

Would the OpenSSL version per environment cause issues in the underlying crypto module that hash-files uses? Let's say I use hash-files to md5 a folder of files on one platform and do the same thing with the same content on another platform. Would OpenSSL differences cause a difference in the md5 hash?

@mac-
Copy link
Owner

mac- commented Jan 29, 2016

The algorithm should be platform agnostic and should produce the same hash given that the string you are hashing is the same on each platform. With that said, the answers to this SO question may shed some light as to why the input string might be different on various platforms.

You need to make sure that all platforms are encoding the password the same way (i.e. ISO-8859-1 vs. UTF-8 vs. UTF-16 vs. UTF-8 with BOM...), and if anything's added (like the newline) it should be consistent (e.g. Windows tends to use CRLF at the end of lines, instead of just LF...).

@shaunwarman
Copy link
Author

Thanks for the info @mac- still looking into the underlying issue.

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