passwordping 1.0.2 → 1.0.3
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 +4 -4
- data/README.md +4 -2
- data/lib/passwordping.rb +6 -0
- data/lib/passwordping/password_type.rb +1 -0
- data/lib/passwordping/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe37829dbe1e1605b38a6e8f49d64f1ac81cf6b
|
4
|
+
data.tar.gz: 4bbe44614e5714edb2214bef700511fe4be71ff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bccc0f2d397a7eee0772730a34f504a25f6ef17a3eb72b5f40eb5abf41aae53785433b181d0d4bbd8542b283dfdf4e7b6d5b7bda815120e9c7f72fc0971e9549
|
7
|
+
data.tar.gz: bbbbb789c4a56928551fa1a098454360b03a67cae33721df5da6679be9f9bdd3962c7f031dd1f303e29bafaa8c8ae75f9fb701d81a9bcc2504e73248edb89ffe
|
data/README.md
CHANGED
@@ -65,19 +65,21 @@ More information in reference format can be found below.
|
|
65
65
|
The standard constructor takes the API key and secret you were issued on PasswordPing signup.
|
66
66
|
|
67
67
|
```ruby
|
68
|
-
passwordping = PasswordPing::PasswordPing(YOUR_API_KEY, YOUR_API_SECRET)
|
68
|
+
passwordping = PasswordPing::PasswordPing.new(apiKey: YOUR_API_KEY, secret: YOUR_API_SECRET)
|
69
69
|
```
|
70
70
|
|
71
71
|
If you were instructed to use an alternate API endpoint, you may call the overloaded constructor and pass the base URL you were provided.
|
72
72
|
|
73
73
|
```ruby
|
74
|
-
passwordping = PasswordPing::PasswordPing(YOUR_API_KEY, YOUR_API_SECRET, "https://api-alt.passwordping.com/v1")
|
74
|
+
passwordping = PasswordPing::PasswordPing.new(apiKey: YOUR_API_KEY, secret: YOUR_API_SECRET, baseURL: "https://api-alt.passwordping.com/v1")
|
75
75
|
```
|
76
76
|
|
77
77
|
## Platform Requirements
|
78
78
|
|
79
79
|
OSX and Linux platforms are fully supported. Windows is not, since FFI support is needed for some of the cryptography libraries, which is problematic on Windows.
|
80
80
|
|
81
|
+
Ruby 2.0.0 and up are supported.
|
82
|
+
|
81
83
|
## RubyDocs
|
82
84
|
|
83
85
|
The RubyDocs contain more complete references for the API functions.
|
data/lib/passwordping.rb
CHANGED
@@ -137,6 +137,8 @@ module PasswordPing
|
|
137
137
|
return Hashing.sha1(password)
|
138
138
|
when PasswordType::SHA256
|
139
139
|
return Hashing.sha256(password)
|
140
|
+
when PasswordType::SHA512
|
141
|
+
return Hashing.sha512(password)
|
140
142
|
when PasswordType::IPBoard_MyBB
|
141
143
|
if (salt != nil && salt.length > 0)
|
142
144
|
return Hashing.mybb(password, salt)
|
@@ -171,6 +173,10 @@ module PasswordPing
|
|
171
173
|
if (salt != nil && salt.length > 0)
|
172
174
|
return Hashing.md5crypt(password, salt)
|
173
175
|
end
|
176
|
+
when PasswordType::CustomAlgorithm4
|
177
|
+
if (salt != nil && salt.length > 0)
|
178
|
+
return Hashing.custom_algorithm4(password, salt)
|
179
|
+
end
|
174
180
|
end
|
175
181
|
|
176
182
|
return nil
|
data/lib/passwordping/version.rb
CHANGED