rotp 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -52,8 +52,8 @@ The library works with the Google Authenticator iPhone and Android app, and also
52
52
  includes the ability to generate provisioning URI's for use with the QR Code scanner
53
53
  built into the app.
54
54
 
55
- totp.provisioning_uri # => 'otpauth://totp/alice@google.com?secret=JBSWY3DPEHPK3PXP'
56
- hotp.provisioning_uri # => 'otpauth://hotp/alice@google.com?secret=JBSWY3DPEHPK3PXP&counter=0'
55
+ totp.provisioning_uri("alice@google.com") # => 'otpauth://totp/alice@google.com?secret=JBSWY3DPEHPK3PXP'
56
+ hotp.provisioning_uri("alice@google.com", 0) # => 'otpauth://hotp/alice@google.com?secret=JBSWY3DPEHPK3PXP&counter=0'
57
57
 
58
58
  This can then be rendered as a QR Code which can then be scanned and added to the users
59
59
  list of OTP credentials.
data/lib/rotp/otp.rb CHANGED
@@ -50,7 +50,7 @@ module ROTP
50
50
  result << (int & 0xFF).chr
51
51
  int >>= 8
52
52
  end
53
- result.reverse.join.rjust(8, 0.chr)
53
+ result.reverse.join.rjust(padding, 0.chr)
54
54
  end
55
55
 
56
56
  end
data/lib/rotp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ROTP
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rotp
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 25
5
+ prerelease:
5
6
  segments:
6
7
  - 1
7
8
  - 3
8
- - 0
9
- version: 1.3.0
9
+ - 1
10
+ version: 1.3.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Mark Percival
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-05-01 00:00:00 -07:00
18
+ date: 2011-09-23 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -74,6 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
75
  requirements:
75
76
  - - ">="
76
77
  - !ruby/object:Gem::Version
78
+ hash: 3
77
79
  segments:
78
80
  - 0
79
81
  version: "0"
@@ -82,13 +84,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  requirements:
83
85
  - - ">="
84
86
  - !ruby/object:Gem::Version
87
+ hash: 3
85
88
  segments:
86
89
  - 0
87
90
  version: "0"
88
91
  requirements: []
89
92
 
90
93
  rubyforge_project: rotp
91
- rubygems_version: 1.3.7
94
+ rubygems_version: 1.6.2
92
95
  signing_key:
93
96
  specification_version: 3
94
97
  summary: A Ruby library for generating and verifying one time passwords