YubiRuby 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.hgignore +30 -0
- data/.hgtags +4 -0
- data/.rspec +2 -0
- data/CHANGELOG +3 -1
- data/Gemfile +4 -0
- data/LICENSE +1 -1
- data/README.developer.txt +17 -0
- data/README.md +43 -0
- data/Rakefile +64 -50
- data/YubiRuby.gemspec +31 -45
- data/bin/modhex +1 -1
- data/bin/yubikey +1 -1
- data/ext/libyubikey/libyubikey.c +14 -14
- data/ext/libyubikey/ykaes.c +101 -1
- data/ext/libyubikey/ykcrc.c +3 -3
- data/ext/libyubikey/ykhex.c +3 -5
- data/ext/libyubikey/ykmodhex.c +3 -5
- data/ext/libyubikey/ykparse.c +115 -9
- data/ext/libyubikey/yktoken.c +52 -0
- data/ext/libyubikey/yubikey.h +23 -8
- data/lib/fake_yubikey.rb +51 -55
- data/lib/hex.rb +10 -29
- data/lib/version.rb +3 -0
- data/lib/yubiruby.rb +2 -2
- data/test/fake_yubikey_spec.rb +1 -1
- data/test/hex_spec.rb +1 -1
- data/test/modhex_spec.rb +2 -2
- data/test/yubiruby_spec.rb +7 -0
- metadata +144 -143
- data/Manifest +0 -29
- data/README +0 -44
data/Manifest
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
LICENSE
|
3
|
-
Manifest
|
4
|
-
README
|
5
|
-
Rakefile
|
6
|
-
bin/modhex
|
7
|
-
bin/yubikey
|
8
|
-
ext/libyubikey/extconf.rb
|
9
|
-
ext/libyubikey/libyubikey.c
|
10
|
-
ext/libyubikey/ykaes.c
|
11
|
-
ext/libyubikey/ykcrc.c
|
12
|
-
ext/libyubikey/ykhex.c
|
13
|
-
ext/libyubikey/ykmodhex.c
|
14
|
-
ext/libyubikey/ykparse.c
|
15
|
-
ext/libyubikey/yubikey.h
|
16
|
-
lib/exceptions.rb
|
17
|
-
lib/fake_yubikey.rb
|
18
|
-
lib/hex.rb
|
19
|
-
lib/yubiruby.rb
|
20
|
-
tasks/yard_doc.rake
|
21
|
-
test/fake_yubikey_spec.rb
|
22
|
-
test/hex_spec.rb
|
23
|
-
test/modhex_spec.rb
|
24
|
-
test/path_loader.rb
|
25
|
-
test/tc_crc16.rb
|
26
|
-
test/tc_fake_yubikey.rb
|
27
|
-
test/tc_hex.rb
|
28
|
-
test/tc_modhex.rb
|
29
|
-
test/test_helper.rb
|
data/README
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
= YubyRuby
|
2
|
-
|
3
|
-
Yubico Server wrapper in Ruby
|
4
|
-
|
5
|
-
|
6
|
-
== Installation
|
7
|
-
|
8
|
-
$ gem install YubiRuby
|
9
|
-
|
10
|
-
== Some examples
|
11
|
-
|
12
|
-
Checking an OTP
|
13
|
-
|
14
|
-
require 'rubygems'
|
15
|
-
require 'YubiRuby'
|
16
|
-
|
17
|
-
key = "6df89690b5f51bd9ac912c5004781e86" #use your AES key
|
18
|
-
y = YubiRuby::Yubikey.new(key);
|
19
|
-
puts y.key
|
20
|
-
otp = gets().strip
|
21
|
-
puts y.parse(otp)
|
22
|
-
puts "Ouput: #{y}"
|
23
|
-
puts "uid: #{y.uid}"
|
24
|
-
puts "session counter: #{y.session_counter}"
|
25
|
-
puts "capslock: #{y.triggered_by_capslock?}"
|
26
|
-
puts "timestamp low/high: #{y.timestamp_low}/#{y.timestamp_high}"
|
27
|
-
puts "session use: #{y.session_use}"
|
28
|
-
puts "random: #{y.random}"
|
29
|
-
puts "crc: #{y.crc}"
|
30
|
-
puts "crc residue: #{y.crc_residue}"
|
31
|
-
puts "crc residue ok?: #{y.crc?} (#{y.crc_residue} == #{YubiRuby::Yubikey::CRC_OK_RESIDUE})"
|
32
|
-
|
33
|
-
Generating a valid yubikey
|
34
|
-
|
35
|
-
key = YubiRuby::FakeYubikey.new
|
36
|
-
key.set_random_key
|
37
|
-
key.set_random_uid
|
38
|
-
key.public_id = "vvefeeccebek"
|
39
|
-
puts "Yubikey generated"
|
40
|
-
puts "public id:\t#{key.public_id}"
|
41
|
-
puts "key:\t\t#{key.key}"
|
42
|
-
puts "uid:\t\t#{key.uid}"
|
43
|
-
puts "And now 3 otp"
|
44
|
-
3.times { puts key.otp }
|