Skip to content

Instantly share code, notes, and snippets.

@vstakhov
Created September 9, 2019 19:09
Show Gist options
  • Save vstakhov/d0169ea6e5416c4b637d5139821e15e3 to your computer and use it in GitHub Desktop.
Save vstakhov/d0169ea6e5416c4b637d5139821e15e3 to your computer and use it in GitHub Desktop.
local cr = require "rspamd_cryptobox_hash"
local rspamd_util = require "rspamd_util"
local lua_util = require "lua_util"
repeat
local inp = rspamd_util.readline()
if inp then
print(cr.create(lua_util.rspamd_str_trim(inp)):base32():sub(1, 32))
end
until not inp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment