give Lua access to tomcrypt's SHA256
This adds Lua hooks to CryptManager for libtomcrypt's SHA256 hash function. It follows along with the C++ patterns Glenn wrote a decade and a half ago for CryptMananger's MD5 and SHA1 hooks. StepMania's CMakeProject-tomcrypt file has been updated to build with sha256 symbols. Invoking cmake to build with system tomcrypt works fine as-is. Note that these functions return binary formatted strings, but themers can convert to hexadecimal format using the global Lua function BinaryToHex().
This commit is contained in:
Vendored
+1
@@ -823,6 +823,7 @@ else()
|
||||
sm_add_compile_definition("tomcrypt" LTC_DEVRANDOM)
|
||||
|
||||
# Common formulas used by our app.
|
||||
sm_add_compile_definition("tomcrypt" LTC_SHA256)
|
||||
sm_add_compile_definition("tomcrypt" LTC_SHA1)
|
||||
sm_add_compile_definition("tomcrypt" LTC_MD5)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user