summaryrefslogtreecommitdiff
path: root/lib/srp/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/srp/session.rb')
-rw-r--r--lib/srp/session.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/srp/session.rb b/lib/srp/session.rb
index f4b7430..38c9722 100644
--- a/lib/srp/session.rb
+++ b/lib/srp/session.rb
@@ -30,17 +30,21 @@ module SRP
end
end
- def to_json(options={})
+ def to_hash
if @m2
- { :M2 => @m2.to_s(16) }.to_json(options)
+ { :M2 => @m2.to_s(16) }
else
{ :B => bb.to_s(16),
-# :b => @b.to_s(16), # only use for debugging
+# :b => @b.to_s(16), # only use for debugging
:salt => @user.salt.to_s(16)
- }.to_json(options)
+ }
end
end
+ def to_json(options={})
+ to_hash.to_json(options)
+ end
+
protected