MD5 module

I need to hash some values with MD5 on the server api side.

I saw that there is already a md5 module in the lualib/resty folder.

Can I require this in the server main.lua? If yes how do I do this?

If no, can I install another md5 packages without any coronium updates resetting it? Which one would you recommend using?

Hi,

Coronium Core has LuaCrypto installed, so you should be able to do:

function api.md5hash(input) local crypto = require("crypto") local md5 = crypto.digest("md5", "somestringtomd5") ... end

-dev

Thanks. Tested and working!

Exactly what I needed.

Hi,

I dont recall seing info about this in the documentation.

Would be useful to have so we know which tools are available.

Hi,

It’s mostly used internally, but I’ll drop a note in the docs. The next release will have a core.md5 utility method.

-dev

Hi,

Coronium Core has LuaCrypto installed, so you should be able to do:

function api.md5hash(input) local crypto = require("crypto") local md5 = crypto.digest("md5", "somestringtomd5") ... end

-dev

Thanks. Tested and working!

Exactly what I needed.

Hi,

I dont recall seing info about this in the documentation.

Would be useful to have so we know which tools are available.

Hi,

It’s mostly used internally, but I’ll drop a note in the docs. The next release will have a core.md5 utility method.

-dev