ruby-entropy 0.1.2 → 0.2.0

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ruby-entropy.rb +8 -0
  3. metadata +10 -12
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3286927c36f11285440722153fbb6020aad5f7c0
4
+ data.tar.gz: 9ba872ca86fb6117edf41190115bba1025879fb9
5
+ SHA512:
6
+ metadata.gz: d408df3bc653f3b906307fbf6385361df29a6cf8dfb2a97e188299c4efb5edaef9023f603603bdb4eb2f8ec34e1d25254413367799c44061c2adada0d6c8dd7f
7
+ data.tar.gz: e1c5a05b614fe472fd221b8fa49e8fea2618360a03906f04fa10c61a32589ff96414710042cef4bbf96bc014c9d40adb6fe22aefd49903ba934423f30e01d2c1
@@ -14,6 +14,14 @@ class RubyEntropy
14
14
  (31 * bad_passphrase_multiplier * Math.log(entropy / 13.62)).round(2)
15
15
  end
16
16
 
17
+ def self.blacklist_passphrase(phrase)
18
+ if phrase.class != String
19
+ return 'you must enter a string'
20
+ end
21
+ COMMON_PASSPHRASES.push(phrase.downcase)
22
+ return 'success'
23
+ end
24
+
17
25
  private
18
26
 
19
27
  def entropy
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-entropy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Brooks Mason
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
11
+ date: 2013-08-17 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Returns passphrase strength based on entropy and weak passphrase tests
15
14
  email: brooksmason@gmail.com
@@ -18,29 +17,28 @@ extensions: []
18
17
  extra_rdoc_files: []
19
18
  files:
20
19
  - lib/ruby-entropy.rb
21
- homepage: http://rubygems.org/gems/ruby-entropy
22
- licenses: []
20
+ homepage: http://github.com/broppler/ruby-entropy
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
23
24
  post_install_message:
24
25
  rdoc_options: []
25
26
  require_paths:
26
27
  - lib
27
28
  required_ruby_version: !ruby/object:Gem::Requirement
28
- none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  required_rubygems_version: !ruby/object:Gem::Requirement
34
- none: false
35
34
  requirements:
36
- - - ! '>='
35
+ - - '>='
37
36
  - !ruby/object:Gem::Version
38
37
  version: '0'
39
38
  requirements: []
40
39
  rubyforge_project:
41
- rubygems_version: 1.8.25
40
+ rubygems_version: 2.0.3
42
41
  signing_key:
43
- specification_version: 3
42
+ specification_version: 4
44
43
  summary: passphrase strength algorithm
45
44
  test_files: []
46
- has_rdoc: