Switched from md5 to sha256 for dialback key generation

Fri, 28 Nov 2008 01:13:34 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 28 Nov 2008 01:13:34 +0500
changeset 448
2623519b25b0
parent 447
c0dae734d3bf
child 449
c0a4a1e63d70

Switched from md5 to sha256 for dialback key generation

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Fri Nov 28 00:48:16 2008 +0500
+++ b/core/s2smanager.lua	Fri Nov 28 01:13:34 2008 +0500
@@ -21,7 +21,7 @@
 
 local log = logger_init("s2smanager");
 
-local md5_hash = require "util.hashes".md5;
+local sha256_hash = require "util.hashes".sha256;
 
 local dialback_secret = "This is very secret!!! Ha!";
 
@@ -210,7 +210,7 @@
 end
 
 function generate_dialback(id, to, from)
-	return md5_hash(id..to..from..dialback_secret); -- FIXME: See XEP-185 and XEP-220
+	return sha256_hash(id..to..from..dialback_secret, true);
 end
 
 function verify_dialback(id, to, from, key)

mercurial