ruby-srp 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/srp/session.rb CHANGED
@@ -30,17 +30,21 @@ module SRP
30
30
  end
31
31
  end
32
32
 
33
- def to_json(options={})
33
+ def to_hash
34
34
  if @m2
35
- { :M2 => @m2.to_s(16) }.to_json(options)
35
+ { :M2 => @m2.to_s(16) }
36
36
  else
37
37
  { :B => bb.to_s(16),
38
- # :b => @b.to_s(16), # only use for debugging
38
+ # :b => @b.to_s(16), # only use for debugging
39
39
  :salt => @user.salt.to_s(16)
40
- }.to_json(options)
40
+ }
41
41
  end
42
42
  end
43
43
 
44
+ def to_json(options={})
45
+ to_hash.to_json(options)
46
+ end
47
+
44
48
  protected
45
49
 
46
50
 
data/ruby-srp.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "ruby-srp"
3
- s.version = "0.1.5"
3
+ s.version = "0.1.6"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["Azul"]
6
6
  s.email = ["azul@leap.se"]
data/test/session_test.rb CHANGED
@@ -26,6 +26,7 @@ class SessionTest < Test::Unit::TestCase
26
26
  assert_equal bb.to_s(16), session.bb.to_s(16)
27
27
  assert_equal self, session.authenticate(m)
28
28
  assert_equal({'M2' => m2.to_s(16)}.to_json, session.to_json)
29
+ assert_equal({:M2 => m2.to_s(16)}, session.to_hash)
29
30
  end
30
31
 
31
32
  def test_zero_padded_salt
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-srp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-02-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: SRP client and server based on version 6 of the standard
15
15
  email: