otp 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c5be10fdb528da5e72ee28f45a98265c7fad8e4
4
- data.tar.gz: 237c2004139b3314964b3a93bb4b2ed7eacb22d6
3
+ metadata.gz: f2cff8ad3604a6598f352b74b34c4e9414117a59
4
+ data.tar.gz: ea8d49ef4dfcf5fd5f0b56864e62c30ada976aac
5
5
  SHA512:
6
- metadata.gz: 30734912941bd921dccc0f0cb98a2e45c2d83e251b2bd359647d2685a5655d389fca40f3514d21731fc6665e03ce8102224d513e714772e1610393c16b6f944c
7
- data.tar.gz: d0a3a72ba084e92dc638c07bc76d14d663754c9725d175b1994e4c134c9ac86c28a1f7a20812a634a952c71d2443ee9cfdbc7b0a4116f5392b22ac668f85b260
6
+ metadata.gz: 6f215a20f4330cad4bea4b5758175784dd9db09f15b417a8db3d1e17386268ee6019dccae63074ddf9ffd6bf9179d4a08700096447c5ef1f42dda2b5128c4617
7
+ data.tar.gz: 2d18ba3ef5dadff11b78327dae54f2060c4b1b82a2afdbfba9b1de80ddcd92de4e6e92b51c8821022bb2a38627def98121693b8916f400037dc09524c21fc829
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # One-Time Password Library
2
2
 
3
+ [![Build Status](https://secure.travis-ci.org/gotoyuzo/otp.png)](https://travis-ci.org/gotoyuzo/otp)
4
+ [![Gem Version](https://badge.fury.io/rb/otp.svg)](https://rubygems.org/gems/otp)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/gotoyuzo/otp/blob/master/LICENSE.txt)
6
+
3
7
  This library provides an implementation of
4
8
  HMAC-Based One-Time Password Algorithm (HOTP; RFC4226) and
5
9
  Time-Based One-Time Password Algorithm (HOTP; RFC6238).
@@ -14,14 +18,17 @@ To create new TOTP secret:
14
18
 
15
19
  require "otp"
16
20
 
21
+ # Create a TOTP instance and new key
17
22
  totp = OTP::TOTP.new
18
23
  totp.new_secret # create random secret
24
+ p totp.password #=> "123456" (password for the current time)
25
+
26
+ # Inspect TOTP parameters
19
27
  p totp.secret #=> "YVMR2G7N4OAXGKFC" (BASE32-formated HMAC key)
20
28
  p totp.algorithm #=> "SHA1" (HMAC algorithm; default SHA1)
21
29
  p totp.digits #=> 6 (number of password digits; default 6)
22
30
  p totp.period #=> 30 (time step period in second; default 30)
23
31
  p totp.time #=> nil (UNIX time by Time or Integer; nil for the current time)
24
- p totp.password #=> "123456" (password for the current time)
25
32
 
26
33
  # Format TOTP URI. Otpauth scheme URLs can be read by OTP::URI.parse.
27
34
  totp.issuer = "My Company"
@@ -56,7 +56,7 @@ module OTP
56
56
  raise NotImplementedError
57
57
  end
58
58
 
59
- def extract_type_specific_uri_param
59
+ def extract_type_specific_uri_params(query)
60
60
  raise NotImplementedError
61
61
  end
62
62
  end
@@ -1,4 +1,4 @@
1
1
  module OTP
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
4
4
 
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["gotoyuzo@notwork.org"]
11
11
  spec.summary = %q{One-Time Password Library}
12
12
  spec.description = %q{An implementation of HOTP (RFC4226) and TOTP (RFC6238).}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/gotoyuzo/otp"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: otp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuuzou Gotou
@@ -63,7 +63,7 @@ files:
63
63
  - test/test_hotp.rb
64
64
  - test/test_totp.rb
65
65
  - test/test_uri.rb
66
- homepage: ''
66
+ homepage: https://github.com/gotoyuzo/otp
67
67
  licenses:
68
68
  - MIT
69
69
  metadata: {}