-
Notifications
You must be signed in to change notification settings - Fork 91
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
Implement cryptographic hashing via various algorithms #122
Conversation
* use `mlua::prelude::*` instead of importing individual things * `digest()` now returns a `RuntimeError` instead of `ExternalError`
* Expands the `impl_hash_algo!` macro to implement required methods in the Crypto struct for each CryptoAlgo * Adds Blake2 hashers (Blake2s256 & Blake2b512)
@RustCrypto doesn't have a Blake3 implementation for Rust, so it might be a bit tricky to interop with our current framework being used for this. |
Thank you for the PR! However, I'm not really sure if this is what I'd like hashing/crypto algorithms to look like in Lune. From a users perspective:
I think this still needs some additional thought and design before moving on. The implementation using macros, boxing, mutexes seems more complex than it needs to be. Luau now also has a native buffer type, which negates some of the performance concerns we previously had for an API more similar to |
What's in this PR?
Closes #105.
Refer to the above issue for tracking/implementation discussions.
TODO
LuaUserData
FromLua
From
for convenienceCryptoAlgo
enum2, 3)