sixarm_ruby_password_salt 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- xyLĈE�ȧs9��[*߰Jo�� ��
2
- � k'� � @У����W'��#��+6,P5��.pfȠ•<�*�*Jwy�M��M�
1
+ ]Z���k� �����ur޲����\u�����ia���F(WA���yM .��J�f�́ bMF��v@mp'N;1�����' ��m�5]�J����N1:jVF�\�g�‡ &�3{i�ȓ
File without changes
@@ -0,0 +1,96 @@
1
+ # SixArm.com » Ruby » <br> PasswordSalt class to generate secure user-friendly passwords
2
+
3
+ * Docs: <http://sixarm.com/sixarm_ruby_password_salt/doc>
4
+ * Repo: <http://github.com/sixarm/sixarm_ruby_password_salt>
5
+ * Email: Joel Parker Henderson, <joel@sixarm.com>
6
+
7
+
8
+ ## Introduction
9
+
10
+ Password tool to create strong user-friendly salt for hashes,
11
+ using Ruby's secure random cryptographic functions.
12
+
13
+ For docs go to <http://sixarm.com/sixarm_ruby_password_salt/doc>
14
+
15
+ Want to help? We're happy to get pull requests.
16
+
17
+
18
+ ## Quickstart
19
+
20
+ Install:
21
+
22
+ gem install sixarm_ruby_password_salt
23
+
24
+ Bundler:
25
+
26
+ gem "sixarm_ruby_password_salt", "=1.3.-"
27
+
28
+ Require:
29
+
30
+ require "sixarm_ruby_password_salt"
31
+
32
+
33
+ ## High Security (Optional)
34
+
35
+ To enable high security for all our gems:
36
+
37
+ wget http://sixarm.com/sixarm.pem
38
+ gem cert --add sixarm.pem
39
+ gem sources --add http://sixarm.com
40
+
41
+ To install with high security:
42
+
43
+ gem install sixarm_ruby_password_salt --test --trust-policy HighSecurity
44
+
45
+
46
+ ## Example
47
+
48
+ Generate a salt:
49
+
50
+ require 'sixarm_ruby_password_salt'
51
+ PasswordSalt.new => "ezkabtsu"
52
+
53
+ This generates a secure random 8 character salt
54
+ of all lowercase letters with 26^8 combinations.
55
+ This can easily be sent via web URIs, email, etc.
56
+
57
+
58
+ ## SecureRandom
59
+
60
+ Ruby 1.8.6 and older does not have a secure random number method,
61
+ so this gem checks to see if the SecureRandom class is defined;
62
+ if it is not, then we require our sixarm_ruby_secure_random gem.
63
+
64
+
65
+ ## Changes
66
+
67
+ * 2012-03-16 1.3.0 Upgrade for Ruby 1.9.3, minitest/spec, and improved docs.
68
+
69
+
70
+ ## License
71
+
72
+ You may choose any of these open source licenses:
73
+
74
+ * Apache License
75
+ * BSD License
76
+ * CreativeCommons License, Non-commercial Share Alike
77
+ * GNU General Public License Version 2 (GPL 2)
78
+ * GNU Lesser General Public License (LGPL)
79
+ * MIT License
80
+ * Perl Artistic License
81
+ * Ruby License
82
+
83
+ The software is provided "as is", without warranty of any kind,
84
+ express or implied, including but not limited to the warranties of
85
+ merchantability, fitness for a particular purpose and noninfringement.
86
+
87
+ In no event shall the authors or copyright holders be liable for any
88
+ claim, damages or other liability, whether in an action of contract,
89
+ tort or otherwise, arising from, out of or in connection with the
90
+ software or the use or other dealings in the software.
91
+
92
+ This license is for the included software that is created by SixArm;
93
+ some of the included software may have its own licenses, copyrights,
94
+ authors, etc. and these do take precedence over the SixArm license.
95
+
96
+ Copyright (c) 2005-2012 Joel Parker Henderson
@@ -0,0 +1,8 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << 'lib' << 'test'
7
+ t.pattern = 'test/*.rb'
8
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.2.1
@@ -1,33 +1,17 @@
1
+ # -*- coding: utf-8 -*-
1
2
  =begin rdoc
2
-
3
- = SixArm Ruby Gem: Password Salt
4
-
5
- Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
6
- Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
7
- License:: CreativeCommons License, Non-commercial Share Alike
8
- License:: LGPL, GNU Lesser General Public License
9
-
10
- Password tool to create strong user-friendly salt for hashes,
11
- using Ruby's secure random cryptographic functions.
12
-
13
- Example:
14
- require 'sixarm_ruby_password_salt'
15
- PasswordSalt.new => "ezkabtsu"
16
-
17
- This generates a secure random 8 character salt
18
- of all lowercase letters with 26^8 combinations.
19
- This can easily be sent via web URIs, email, etc.
20
-
21
- ==SecureRandom
22
-
23
- Ruby 1.8.6 and older does not have a secure random number method,
24
- so this gem checks to see if the SecureRandom class is defined;
25
- if it is not, then we require our sixarm_ruby_secure_random gem.
26
-
3
+ Please see README
27
4
  =end
28
5
 
29
-
30
- if !defined?(SecureRandom) then require 'sixarm_ruby_secure_random' end
6
+ if !defined?(SecureRandom)
7
+ begin
8
+ # First we will try to load the Ruby standard library
9
+ require 'securerandom'
10
+ rescue
11
+ # Second we will try to load our own SecureRandom gem library
12
+ require 'sixarm_ruby_secure_random'
13
+ end
14
+ end
31
15
 
32
16
 
33
17
  class PasswordSalt < String
@@ -1,15 +1,25 @@
1
- require 'test/unit'
1
+ # -*- coding: utf-8 -*-
2
+ require 'minitest/autorun'
3
+ require 'simplecov'
4
+ SimpleCov.start
2
5
  require 'sixarm_ruby_password_salt'
3
6
 
4
- class Testing < Test::Unit::TestCase
7
+ describe PasswordSalt do
5
8
 
6
- def test_all
7
- 20.times{
8
- x=PasswordSalt.new
9
- assert(x.is_a?(String))
10
- assert_equal(x.length,PasswordSalt::COUNT)
11
- assert(x=~/^[a-z]+$/,"lowercase letters:#{x}")
12
- }
13
- end
9
+ before do
10
+ P ||= PasswordSalt.new
11
+ end
12
+
13
+ it "creates passwords" do
14
+ P.must_be_kind_of String
15
+ end
16
+
17
+ it "uses the given length" do
18
+ P.length.must_equal PasswordSalt::COUNT
19
+ end
20
+
21
+ it "uses lowercase letters exclusively" do
22
+ P.must_match /^[a-z]+$/
23
+ end
14
24
 
15
25
  end
metadata CHANGED
@@ -1,87 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_password_salt
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 2
8
- - 1
9
- version: 1.2.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - SixArm
13
9
  autorequire:
14
10
  bindir: bin
15
- cert_chain:
16
- - |
17
- -----BEGIN CERTIFICATE-----
18
- MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
19
- BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
20
- c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
21
- MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
22
- CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
23
- U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
24
- ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
25
- QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
26
- eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHVea2o9yabbEiS6VSeJWoQIDAQABo4HF
27
- MIHCMB0GA1UdDgQWBBQzPJtqmSgc53eDN7aSzDQwr9TALDCBkgYDVR0jBIGKMIGH
28
- gBQzPJtqmSgc53eDN7aSzDQwr9TALKFkpGIwYDELMAkGA1UEBhMCVVMxEzARBgNV
29
- BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xDzANBgNVBAoT
30
- BlNpeEFybTETMBEGA1UEAxMKc2l4YXJtLmNvbYIJAKPwEETU5bHoMAwGA1UdEwQF
31
- MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAooEexP/oPam1TP71SyuhxMb+uTrZbSQe
32
- jVB+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
33
- ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
34
- eabwpCbAopo=
35
- -----END CERTIFICATE-----
36
-
37
- date: 2010-12-13 00:00:00 -08:00
38
- default_executable:
11
+ cert_chain:
12
+ - !binary |-
13
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQW0yZ0F3SUJB
14
+ Z0lKQUtQd0VFVFU1YkhvTUEwR0NTcUdTSWIzRFFFQkJRVUFNR0F4Q3pBSkJn
15
+ TlYKQkFZVEFsVlRNUk13RVFZRFZRUUlFd3BEWVd4cFptOXlibWxoTVJZd0ZB
16
+ WURWUVFIRXcxVFlXNGdSbkpoYm1OcApjMk52TVE4d0RRWURWUVFLRXdaVGFY
17
+ aEJjbTB4RXpBUkJnTlZCQU1UQ25OcGVHRnliUzVqYjIwd0hoY05NVEF4Ck1q
18
+ RXpNak15TnpFeldoY05NVE13T1RBNE1qTXlOekV6V2pCZ01Rc3dDUVlEVlFR
19
+ R0V3SlZVekVUTUJFR0ExVUUKQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFV
20
+ RUJ4TU5VMkZ1SUVaeVlXNWphWE5qYnpFUE1BMEdBMVVFQ2hNRwpVMmw0UVhK
21
+ dE1STXdFUVlEVlFRREV3cHphWGhoY20wdVkyOXRNSUdmTUEwR0NTcUdTSWIz
22
+ RFFFQkFRVUFBNEdOCkFEQ0JpUUtCZ1FDOTRtRDlKRHdCc3Vuc09JMFZSM0NY
23
+ WGJPV2c5Y1dhV2Npd0Z5Sk5GaU03QTlJOEtQTGZYVXcKUUM0Y3pVZTVadUc0
24
+ V0h2aW5yV2hrckNLKzFkV0Jxb0VDbHhkRi9Gb0tPNWErdG9uR0Nqam1meTgx
25
+ Sm1Gamp5eAplVHNqc0h5dncrUWlrOWtwZjlhajYrcG5rTnJWc3dnTkhWZWEy
26
+ bzl5YWJiRWlTNlZTZUpXb1FJREFRQUJvNEhGCk1JSENNQjBHQTFVZERnUVdC
27
+ QlF6UEp0cW1TZ2M1M2VETjdhU3pEUXdyOVRBTERDQmtnWURWUjBqQklHS01J
28
+ R0gKZ0JRelBKdHFtU2djNTNlRE43YVN6RFF3cjlUQUxLRmtwR0l3WURFTE1B
29
+ a0dBMVVFQmhNQ1ZWTXhFekFSQmdOVgpCQWdUQ2tOaGJHbG1iM0p1YVdFeEZq
30
+ QVVCZ05WQkFjVERWTmhiaUJHY21GdVkybHpZMjh4RHpBTkJnTlZCQW9UCkJs
31
+ TnBlRUZ5YlRFVE1CRUdBMVVFQXhNS2MybDRZWEp0TG1OdmJZSUpBS1B3RUVU
32
+ VTViSG9NQXdHQTFVZEV3UUYKTUFNQkFmOHdEUVlKS29aSWh2Y05BUUVGQlFB
33
+ RGdZRUFvb0VleFAvb1BhbTFUUDcxU3l1aHhNYit1VHJaYlNRZQpqVkIrRXhS
34
+ d1dhZEd3YU5QVUE1NmQzOXF3YXZ3UCtpdSszSnBlb25OTVZ2YldYRjVuYUNY
35
+ L2RORkllUkVIekVSClpEUlFZTXFydTlURU1uYTZIRDl6cGNzdEY3dndUaEdv
36
+ dmxPUSszWTZwbFE0bk16aXBYY1o5VEhxczY1UElMMHEKZWFid3BDYkFvcG89
37
+ Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
38
+ date: 2012-03-16 00:00:00.000000000 Z
39
39
  dependencies: []
40
-
41
40
  description:
42
41
  email: sixarm@sixarm.com
43
42
  executables: []
44
-
45
43
  extensions: []
46
-
47
44
  extra_rdoc_files: []
48
-
49
- files:
50
- - README.rdoc
51
- - LICENSE.txt
45
+ files:
46
+ - .gemtest
47
+ - Rakefile
48
+ - README.md
49
+ - VERSION
52
50
  - lib/sixarm_ruby_password_salt.rb
53
51
  - test/sixarm_ruby_password_salt_test.rb
54
- has_rdoc: true
55
52
  homepage: http://sixarm.com/
56
53
  licenses: []
57
-
58
54
  post_install_message:
59
55
  rdoc_options: []
60
-
61
- require_paths:
56
+ require_paths:
62
57
  - lib
63
- required_ruby_version: !ruby/object:Gem::Requirement
58
+ required_ruby_version: !ruby/object:Gem::Requirement
64
59
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- segments:
69
- - 0
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
65
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- segments:
77
- - 0
78
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
79
70
  requirements: []
80
-
81
71
  rubyforge_project:
82
- rubygems_version: 1.3.7
72
+ rubygems_version: 1.8.11
83
73
  signing_key:
84
74
  specification_version: 3
85
- summary: "SixArm Ruby Gem: PasswordSalt class to generate secure websafe strings using random cryptography"
86
- test_files:
75
+ summary: SixArm.com » Ruby » PasswordSalt class to generate secure websafe strings
76
+ using random cryptography
77
+ test_files:
87
78
  - test/sixarm_ruby_password_salt_test.rb
79
+ has_rdoc: true
metadata.gz.sig CHANGED
Binary file
@@ -1,12 +0,0 @@
1
- LICENSE
2
-
3
- You may choose any of these licenses:
4
-
5
- - CreativeCommons License, Non-commercial Share Alike
6
- - LGPL, GNU Lesser General Public License
7
- - MIT License
8
- - Ruby License
9
-
10
- THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
@@ -1,25 +0,0 @@
1
-
2
- = SixArm Ruby Gem: Password Salt
3
-
4
- Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
5
- Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
6
- License:: CreativeCommons License, Non-commercial Share Alike
7
- License:: LGPL, GNU Lesser General Public License
8
-
9
- Password tool to create strong user-friendly salt for hashes,
10
- using Ruby's secure random cryptographic functions.
11
-
12
- Example:
13
- require 'sixarm_ruby_password_salt'
14
- PasswordSalt.new => "ezkabtsu"
15
-
16
- This generates a secure random 8 character salt
17
- of all lowercase letters with 26^8 combinations.
18
- This can easily be sent via web URIs, email, etc.
19
-
20
- ==SecureRandom
21
-
22
- Ruby 1.8.6 and older does not have a secure random number method,
23
- so this gem checks to see if the SecureRandom class is defined;
24
- if it is not, then we require our sixarm_ruby_secure_random gem.
25
-