sixarm_ruby_secure_token 1.3.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.
- data/.gemtest +0 -0
- data/CHANGELOG.txt +5 -0
- data/INSTALL.txt +32 -0
- data/LICENSE.txt +12 -0
- data/README.rdoc +17 -0
- data/Rakefile +8 -0
- data/VERSION +1 -0
- data/lib/sixarm_ruby_secure_token.rb +17 -0
- data/test/sixarm_ruby_secure_token_test.rb +18 -0
- data.tar.gz.sig +0 -0
- metadata +84 -0
- metadata.gz.sig +1 -0
data/.gemtest
ADDED
File without changes
|
data/CHANGELOG.txt
ADDED
data/INSTALL.txt
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
= SixArm.com Ruby Gem Install
|
3
|
+
|
4
|
+
|
5
|
+
First-time users: add our gem certificate and source.
|
6
|
+
When you do this once, it works for all our gems.
|
7
|
+
|
8
|
+
sudo wget http://sixarm.com/sixarm.pem
|
9
|
+
sudo gem cert --add sixarm.pem
|
10
|
+
sudo gem sources --add http://sixarm.com
|
11
|
+
|
12
|
+
Install the gem with advanced options.
|
13
|
+
|
14
|
+
sudo gem install sixarm_ruby_secure_token --test --trust-policy HighSecurity
|
15
|
+
|
16
|
+
|
17
|
+
== Notes
|
18
|
+
|
19
|
+
Do you have any questions, comments, suggestions, or feedback?
|
20
|
+
Let us know, we're happy to help. Our email is sixarm@sixarm.com
|
21
|
+
|
22
|
+
Do you want to create your own high security gems?
|
23
|
+
Learn how at http://www.rubygems.org/read/chapter/21
|
24
|
+
|
25
|
+
To see your current gem certificate list:
|
26
|
+
|
27
|
+
sudo gem cert --list
|
28
|
+
|
29
|
+
Our cert looks like this:
|
30
|
+
|
31
|
+
/C=US/ST=California/L=San Francisco/O=SixArm/CN=sixarm.com
|
32
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,12 @@
|
|
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.
|
data/README.rdoc
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
= SixArm.com » Ruby » SecureToken to generate a cryptographic string that is web\
|
2
|
+
|
3
|
+
Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
|
4
|
+
Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
|
5
|
+
License:: See LICENSE.txt
|
6
|
+
|
7
|
+
Secure random token generator to create strong secure text tokens.
|
8
|
+
|
9
|
+
==Example
|
10
|
+
|
11
|
+
SecureToken.new => "kavzwbnxremyqlkwtxoimxzqpofmpove"
|
12
|
+
|
13
|
+
This generates a 32-character token of all lowercase letters,
|
14
|
+
using Ruby's securerandom methods.
|
15
|
+
|
16
|
+
SecureToken is a string, so you can do any string methods on it.
|
17
|
+
You can change how tokens are randomly created, however you want.
|
data/Rakefile
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.3.0
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
=begin
|
3
|
+
Please see README.rdoc
|
4
|
+
=end
|
5
|
+
|
6
|
+
require 'securerandom'
|
7
|
+
|
8
|
+
class SecureToken < String
|
9
|
+
|
10
|
+
COUNT = 32
|
11
|
+
CHARS = ['a','b','c','d','e','f','g','h','j','k','m','n','p','r','s','t','u','v','w','x','y','z']
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
super(Array.new(COUNT){CHARS[SecureRandom.random_number(CHARS.size)]}.join)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require 'sixarm_ruby_secure_token'
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
|
6
|
+
class Testing < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def test_all
|
9
|
+
20.times{
|
10
|
+
x=SecureToken.new
|
11
|
+
assert(x.is_a?(String))
|
12
|
+
assert_equal(x.length,SecureToken::COUNT)
|
13
|
+
assert(x=~/^[a-z]+$/,"lowercase letters:#{x}")
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sixarm_ruby_secure_token
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.3.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- SixArm
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIDBDCCAm2gAwIBAgIJAKPwEETU5bHoMA0GCSqGSIb3DQEBBQUAMGAxCzAJBgNV
|
15
|
+
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp
|
16
|
+
c2NvMQ8wDQYDVQQKEwZTaXhBcm0xEzARBgNVBAMTCnNpeGFybS5jb20wHhcNMTAx
|
17
|
+
MjEzMjMyNzEzWhcNMTMwOTA4MjMyNzEzWjBgMQswCQYDVQQGEwJVUzETMBEGA1UE
|
18
|
+
CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEPMA0GA1UEChMG
|
19
|
+
U2l4QXJtMRMwEQYDVQQDEwpzaXhhcm0uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GN
|
20
|
+
ADCBiQKBgQC94mD9JDwBsunsOI0VR3CXXbOWg9cWaWciwFyJNFiM7A9I8KPLfXUw
|
21
|
+
QC4czUe5ZuG4WHvinrWhkrCK+1dWBqoEClxdF/FoKO5a+tonGCjjmfy81JmFjjyx
|
22
|
+
eTsjsHyvw+Qik9kpf9aj6+pnkNrVswgNHVea2o9yabbEiS6VSeJWoQIDAQABo4HF
|
23
|
+
MIHCMB0GA1UdDgQWBBQzPJtqmSgc53eDN7aSzDQwr9TALDCBkgYDVR0jBIGKMIGH
|
24
|
+
gBQzPJtqmSgc53eDN7aSzDQwr9TALKFkpGIwYDELMAkGA1UEBhMCVVMxEzARBgNV
|
25
|
+
BAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xDzANBgNVBAoT
|
26
|
+
BlNpeEFybTETMBEGA1UEAxMKc2l4YXJtLmNvbYIJAKPwEETU5bHoMAwGA1UdEwQF
|
27
|
+
MAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAooEexP/oPam1TP71SyuhxMb+uTrZbSQe
|
28
|
+
jVB+ExRwWadGwaNPUA56d39qwavwP+iu+3JpeonNMVvbWXF5naCX/dNFIeREHzER
|
29
|
+
ZDRQYMqru9TEMna6HD9zpcstF7vwThGovlOQ+3Y6plQ4nMzipXcZ9THqs65PIL0q
|
30
|
+
eabwpCbAopo=
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
|
33
|
+
date: 2011-04-22 00:00:00 -07:00
|
34
|
+
default_executable:
|
35
|
+
dependencies: []
|
36
|
+
|
37
|
+
description:
|
38
|
+
email: sixarm@sixarm.com
|
39
|
+
executables: []
|
40
|
+
|
41
|
+
extensions: []
|
42
|
+
|
43
|
+
extra_rdoc_files: []
|
44
|
+
|
45
|
+
files:
|
46
|
+
- .gemtest
|
47
|
+
- CHANGELOG.txt
|
48
|
+
- INSTALL.txt
|
49
|
+
- LICENSE.txt
|
50
|
+
- Rakefile
|
51
|
+
- README.rdoc
|
52
|
+
- VERSION
|
53
|
+
- lib/sixarm_ruby_secure_token.rb
|
54
|
+
- test/sixarm_ruby_secure_token_test.rb
|
55
|
+
has_rdoc: true
|
56
|
+
homepage: http://sixarm.com/
|
57
|
+
licenses: []
|
58
|
+
|
59
|
+
post_install_message:
|
60
|
+
rdoc_options: []
|
61
|
+
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: "0"
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: "0"
|
76
|
+
requirements: []
|
77
|
+
|
78
|
+
rubyforge_project:
|
79
|
+
rubygems_version: 1.6.2
|
80
|
+
signing_key:
|
81
|
+
specification_version: 3
|
82
|
+
summary: "SixArm.com \xC2\xBB Ruby \xC2\xBB SecureToken to generate a cryptographic string that is web-friendly and user-friendly"
|
83
|
+
test_files:
|
84
|
+
- test/sixarm_ruby_secure_token_test.rb
|
metadata.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*���٧�R���ܢ}b[���ߏPa���N�΅�%�&4��lmĝv����Q�L���=�龯�.�`�$�@��L�'�)�]F+,���s��߸�
|