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

Find suitable hash algorithm implementation in pure Lua #194

Open
josefnpat opened this issue Apr 10, 2015 · 6 comments
Open

Find suitable hash algorithm implementation in pure Lua #194

josefnpat opened this issue Apr 10, 2015 · 6 comments

Comments

@josefnpat
Copy link
Owner

I am looking for a stable and fast Lua lib with a version of SHA.

SHA1, SHA256 or SHA512 would be best, imo. The higher, the better, assuming that the performance isn't miserable.

A good candidate (which was used in vapor0.x): https://bitbucket.org/Boolsheet/bslf

@positive07 says he will research this topic 😄

@josefnpat josefnpat changed the title Find suitable hash algorithm. Find suitable hash algorithm implementation in pure Lua Apr 10, 2015
@pablomayobre
Copy link

Okey fine if you ask me that kindly 😆

@josefnpat
Copy link
Owner Author

@positive07 thanks!

@josefnpat josefnpat assigned josefnpat and unassigned josefnpat Apr 10, 2015
@pablomayobre
Copy link

Well I have a SHA-256 working, gonna investigate for SHA-512 now

EDIT: Well actually later, have things to do right now 😞

@pablomayobre
Copy link

Why didnt you use SHA-256 when it is already in hash.lua @josefnpat ?

SHA-512 requires 64bits, so I'll need to use something like this, the algorithm itself is pretty much the same as SHA-256, so after I implement that I will test them all.

Another note: Boolsheet's and the hash library have a loading overhead, after that they are pretty darn fast, so it is recommend it to load it once, but the current hashing system creates a thread whenever there is a need for hashing, it may be better to have a thread that is constantly waiting for messages, and hashes whatever it gets (basically to put a loop in the thread), just an idea.

@Bobbyjoness
Copy link

I like that idea but we would have to handle errors with the thread and kinda have thread management figured out.

@pablomayobre
Copy link

That is pretty simple anyway, I can provide a code for that, tomorrow or tonight really late 😝

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

No branches or pull requests

3 participants