Software /
code /
verse
Diff
plugins/vcard_update.lua @ 392:cdea6a28369e
plugins: Use util.hashes instead of util.sha1
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 25 Aug 2015 18:03:10 +0200 |
parent | 380:0891b4e27766 |
child | 395:e86144a4eaa1 |
line wrap: on
line diff
--- a/plugins/vcard_update.lua Tue Aug 25 16:27:38 2015 +0200 +++ b/plugins/vcard_update.lua Tue Aug 25 18:03:10 2015 +0200 @@ -2,15 +2,7 @@ local xmlns_vcard, xmlns_vcard_update = "vcard-temp", "vcard-temp:x:update"; --- MMMmmmm.. hacky -local ok, fun = pcall(function() return require("util.hashes").sha1; end); -if not ok then - ok, fun = pcall(function() return require("util.sha1").sha1; end); - if not ok then - error("Could not find a sha1()") - end -end -local sha1 = fun; +local sha1 = require("util.hashes").sha1; local ok, fun = pcall(function() local unb64 = require("util.encodings").base64.decode;