tripcode 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/tripcode.rb +3 -3
- data/lib/tripcode/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f3ef938748bcfedbd1017885902f2754b2b38cf
|
4
|
+
data.tar.gz: 903fece9bb247f996aedde272a8cdd3577a6138c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4543eb2e8b6a31dd5172543c7d44c1ac6e8da9e272d3696283c60518e1c307ee36b4296a676f3231830b43e45ccb4e01fc7c9748a50d44cb60fe29d665bc2a
|
7
|
+
data.tar.gz: 67f496656ece8197df37c4ea21bc01489090e75b2c71ac66b45798bd48f661e2c2821ad9c56649570991af9b6884c7883607ba1b99d7eda79554d52cb8db536c
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
24
24
|
```ruby
|
25
25
|
require 'tripcode'
|
26
26
|
|
27
|
-
Tripcode.hash('github') # => lLf/rxkwg
|
27
|
+
Tripcode.hash('github') # => 'lLf/rxkwg'
|
28
28
|
Tripcode.secure('github') # => 'qhOg87mFbSndQap'
|
29
29
|
Tripcode.secure('github','secret') # => 'ND8xVvinnkdyYkC'
|
30
30
|
Tripcode.parse('User#password#password') # => ['User', 'ozOtJW9BFA', 'y65WdWQD6Zze1n3']
|
data/lib/tripcode.rb
CHANGED
@@ -20,7 +20,7 @@ module Tripcode
|
|
20
20
|
return "" if password.nil? || password.empty?
|
21
21
|
seed = Base64::decode64(seed)
|
22
22
|
password = password.encode('SHIFT_JIS', 'UTF-8', undef: :replace)
|
23
|
-
secure_tripcode = Digest::SHA1.hexdigest(password.b+seed)
|
23
|
+
secure_tripcode = Digest::SHA1.hexdigest(password.b + seed)
|
24
24
|
secure_tripcode = Base64::encode64([secure_tripcode].pack('H*'))
|
25
25
|
return secure_tripcode[0..14]
|
26
26
|
end
|
@@ -32,9 +32,8 @@ module Tripcode
|
|
32
32
|
name = "" if name.nil?
|
33
33
|
return name, tripcode, secure_tripcode
|
34
34
|
end
|
35
|
-
end
|
36
35
|
|
37
|
-
SECRET = <<-EOS
|
36
|
+
SECRET = <<-EOS
|
38
37
|
FW6I5Es311r2JV6EJSnrR2+hw37jIfGI0FB0XU5+9lua9iCCrwgkZDVRZ+1PuClqC+78FiA6hhhX
|
39
38
|
U1oq6OyFx/MWYx6tKsYeSA8cAs969NNMQ98SzdLFD7ZifHFreNdrfub3xNQBU21rknftdESFRTUr
|
40
39
|
44nqCZ0wyzVVDySGUZkbtyHhnj+cknbZqDu/wjhX/HjSitRbtotpozhF4C9F+MoQCr3LgKg+CiYH
|
@@ -44,3 +43,4 @@ H9WYimTJWTrK397HMWepK6LJaUB5GdIk56ZAULjgZB29qx8Cl+1K0JWQ0SI5LrdjgyZZUTX8LB/6
|
|
44
43
|
Coix9e6+3c05Pk6Bi1GWsMWcJUf7rL9tpsxROtq0AAQBPQ0rTlstFEziwm3vRaTZvPRboQfREta0
|
45
44
|
9VA+tRiWfN3XP+1bbMS9exKacGLMxR/bmO5A57AgQF+bPjhif5M/OOJ6J/76q0JDHA==
|
46
45
|
EOS
|
46
|
+
end
|
data/lib/tripcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tripcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|