summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-10-04 13:08:21 +0200
committerAzul <azul@riseup.net>2012-10-04 13:08:21 +0200
commit0c70bc88f14f9cc92a98a902a99b88a9b1f672e6 (patch)
tree7e5a3fa7c863f6e8f1628a45e3d1cebc95cfb88e /test
parent777254f7ba10a0dd8fbee433e6a631d96e9d76f0 (diff)
using the SRP 6a algorithm for calculating M
Diffstat (limited to 'test')
-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