summaryrefslogtreecommitdiff
path: root/test/util_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/util_test.rb')
-rw-r--r--test/util_test.rb6
1 files changed, 6 insertions, 0 deletions
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