Some sort of cryptographic hash function

I'm currently using a pretty non-performant MD5 function written in Lua, but it'd be really cool to have one in the SDK (especially if it's written in C to be fast). It's a pretty common thing to have in a standard lib (despite Lua surprisingly not having one!).

Ideally it'd be something a little stronger (something in the SHA series for example), but I know the PD is pretty CPU constrained, so something simpler like MD5 would be totally fine.

2 Likes

What is your use case? Just wondering.

I could see some fast hashes written in Lua on Google, could they suit your needs?

Right now I use it to sign the scores for my leaderboards. Generate a salted hash, send it to the server through a QR code, consider the data golden if the signature verifies.

I could see other use cases for it as well (quickly comparing data for equality, password/hidden code verification if you didn't want the bare strings hanging out in the executable, and so on).

This might be a good use case for me to buckle down and write a toybox library that is a really performant version of what I'm using now, but if we had one in the SDK, I wouldn't have to. :grin:

3 Likes