From 0c70bc88f14f9cc92a98a902a99b88a9b1f672e6 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 4 Oct 2012 13:08:21 +0200 Subject: using the SRP 6a algorithm for calculating M --- test/util_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/util_test.rb b/test/util_test.rb index 9b1d09b..4dd6d86 100644 --- a/test/util_test.rb +++ b/test/util_test.rb @@ -30,4 +30,10 @@ class UtilTest < Test::Unit::TestCase "%x" % multiplier end + def test_hn_xor_hg + # >>> binascii.hexlify (pysrp.HNxorg(hashlib.sha256, N, g)) + assert_equal '928ade491bc87bba9eb578701d44d30ed9080e60e542ba0d3b9c20ded9f592bf', + hn_xor_hg.bytes.map{|b| "%02x" % b.ord}.join + end + end -- cgit v1.2.3