passphrase 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4033cb9da1097b10de0c83644706f4b5ec71d04a
4
- data.tar.gz: aba0d115c820f615f3f6124688f548b96f0fe9ba
3
+ metadata.gz: 6839c4a93fcaa7b8ab1b15bcc1e5008f00167dde
4
+ data.tar.gz: 155d75784ec0a430721e6d9521c1e33eff210e12
5
5
  SHA512:
6
- metadata.gz: 4cb595f7d1b1de7ee367a32817a6c5f9f1e568a12433303867f188192d7c8e4354c7ea3b4d3e40c5218c69592d3ff8b9a47b0fb81169c7263cea198f5bcc1b77
7
- data.tar.gz: c2d8bb80517d152cfdf8f23e4c1c8bcb2f9ca52dfd01dee89b682b931940a849714219176919dade72afbdea97daaa7c9ba16bbbf6b4dea183081630d0352c5d
6
+ metadata.gz: df27ed521cffb79b6c04ce4267d7c4162dcb71ea64448794bf240217bb3b1ae586805dab230c86733a86ffc48dc00d00c667354fba298001bb98a672e5046a64
7
+ data.tar.gz: fd8a89985fce259dfd1041fbb5da86af009af52ed66370aaaab8e2ea2512d53bb6556ba9f057c881f9313a86e2957ebf3e15378240d89a4ebadf31a27795d63a
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,5 @@
1
- uȦvp˨�`E�^x.�Sp,i��Pe��O��BR�c6�% ����}�m{�b��m��&���|�dOe� w��r5GV���En�`$���r�!�� 2B���� �A��Vz�Y:%�SJ�=>o��B�4xJ�%�����I���H)�I��@��c?ϙiջ�P�R�XQ�4 a3���B�Ozaf�D_���arhY����aJm�:b�3� �| �>�f�\L>F�>XVd��"S0�(\J�ƍ^� �_W��
1
+ -K�Im:���XQ����
2
+ G �8ڢN��N�f���0�j~�KX��] mK��^�k��Q
3
+ �|�a?�(��pe�30�g�4
4
+ s����ިu���6�O�����yE3p
5
+ ɸ��$�Ϥ�N^45��Tb�Y��w\W#�\LbK
@@ -2,7 +2,11 @@
2
2
  All notable changes to this project will be documented in this file. This
3
3
  project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## UNRELEASED
5
+ ## Version 1.2.1 - 2015-04-19
6
+ ### Changed
7
+ - Updated documentation in the README file.
8
+
9
+ ## Version 1.2.0 - 2015-04-17
6
10
  ### Added
7
11
  - List available languages.
8
12
  - Added option `--languages|-l` to select a subset of languages.
data/README.md CHANGED
@@ -2,26 +2,23 @@
2
2
  Use Passphrase to generate a passphrase for SSH or GPG keys. For example, on
3
3
  the command-line, run
4
4
 
5
- ```bash
6
- $ passphrase --num-words=4
7
- dokusi uolgo allunga totalisa
8
- ```
5
+ $ passphrase --num-words=4
6
+ dokusi uolgo allunga totalisa
7
+
9
8
  or programmatically,
10
9
 
11
- ```ruby
10
+ ~~~ruby
12
11
  require "passphrase"
13
12
  p = Passphrase::Passphrase.new(number_of_words: 4)
14
13
  passphrase = p.passphrase
15
- ```
14
+ ~~~
16
15
 
17
16
  Passphrase also has the capability to generate passwords (indirectly).
18
17
 
19
18
  ## Installation
20
19
  The Passphrase command-line tool and library can be installed with
21
20
 
22
- ```bash
23
- $ gem install passphrase
24
- ```
21
+ $ gem install passphrase
25
22
 
26
23
  However, because the gem is cryptographically signed to prevent tampering, the
27
24
  preferred installation command should include the `--trust-policy` security
@@ -29,15 +26,11 @@ option, which causes the gem to be verified before being installed. To invoke
29
26
  this option, you must first add my public key `esumbar.pem` to your list of
30
27
  trusted certificates, as follows.
31
28
 
32
- ```bash
33
- $ gem cert --add <(curl -Ls https://raw.githubusercontent.com/esumbar/passphrase/master/certs/esumbar.pem)
34
- ```
29
+ $ gem cert --add <(curl -Ls https://raw.githubusercontent.com/esumbar/passphrase/master/certs/esumbar.pem)
35
30
 
36
31
  Finally, specify the appropriate security level when installing.
37
32
 
38
- ```bash
39
- $ gem install passphrase --trust-policy MediumSecurity
40
- ```
33
+ $ gem install passphrase --trust-policy MediumSecurity
41
34
 
42
35
  Using `MediumSecurity` rather than `HighSecurity` omits dependent gems that
43
36
  are not signed from the verification process. Passphrase depends on the
@@ -46,50 +39,71 @@ unsigned gem `sqlite3`.
46
39
  ## Basic usage
47
40
  ### Command-line tool
48
41
 
49
- ```bash
50
- $ passphrase --help
51
- Usage: passphrase [options]
52
- -l, --languages=LANG1,... Specify languages to use, none for a listing
53
- (default: --languages=all)
54
- -n, --num-words=NUM Number of words in passphrase 3..10
55
- (default: --num-words=5)
56
- -p, --[no-]passwordize Add one cap, one num, and one special char
57
- (default: --no-passwordize)
58
- -r, --[no-]random-org Use RANDOM.ORG to generate random numbers
59
- (default: --no-random-org)
60
- -h, --help Show this message
61
- -v, --version Show version
62
-
63
- $ # generate a passphrase using default settings
64
- $ passphrase
65
- sinmak termyne ismus affidavo recur
66
-
67
- $ # generate a four-word passphrase
68
- $ passphrase -n4
69
- apaisado vermouth seemag ebelik
70
-
71
- $ # generate a passphrase using only English and Spanish words
72
- $ passphrase --languages=english,spanish
73
- fumada hearsay murcio phosphor azufroso
74
-
75
- $ # generate a three-word Polish passphrase and password
76
- $ passphrase -lp -n3 -p
77
- podejrza zmalala wypadkow
78
- 8odej=za_Xmalala_wypadkow
79
-
80
- $ # list the available languages
81
- $ passphrase -l
82
- afrikaans
83
- croatian
84
- czech
85
- diceware
86
- english
87
- ...
88
- ```
42
+ $ passphrase --help
43
+ Usage: passphrase [options]
44
+ -l, --languages=LANG1,... Specify languages to use, none for a listing
45
+ (default: --languages=all)
46
+ -n, --num-words=NUM Number of words in passphrase 3..10
47
+ (default: --num-words=5)
48
+ -p, --[no-]passwordize Add one cap, one num, and one special char
49
+ (default: --no-passwordize)
50
+ -r, --[no-]random-org Use RANDOM.ORG to generate random numbers
51
+ (default: --no-random-org)
52
+ -h, --help Show this message
53
+ -v, --version Show version
54
+
55
+ $ # generate a passphrase using default settings
56
+ $ passphrase
57
+ sinmak termyne ismus affidavo recur
58
+
59
+ $ # generate a four-word passphrase
60
+ $ passphrase -n4
61
+ apaisado vermouth seemag ebelik
62
+
63
+ $ # generate a passphrase using only English and Spanish words
64
+ $ passphrase --languages=english,spanish
65
+ fumada hearsay murcio phosphor azufroso
66
+
67
+ $ # generate a three-word Polish passphrase and password
68
+ $ passphrase -lp -n3 -p
69
+ podejrza zmalala wypadkow
70
+ 8odej=za_Xmalala_wypadkow
71
+
72
+ $ # list the available languages
73
+ $ passphrase -l
74
+ afrikaans
75
+ croatian
76
+ czech
77
+ diceware
78
+ english
79
+ finnish
80
+ french
81
+ italian
82
+ japanese
83
+ latin
84
+ norwegian
85
+ polish
86
+ spanish
87
+ swedish
88
+ turkish
89
89
 
90
90
  ### Ruby library
91
+ Initialize a Passphrase object with
92
+
93
+ ~~~ruby
94
+ Passphrase::Passphrase.new(options={})
95
+ ~~~
96
+
97
+ The following options are accepted.
98
+
99
+ * `:languages` - array of languages from which to select words
100
+ (default: `["all"]`)
101
+ * `:number_of_words` - number of words to select (default: `5`)
102
+ * `:use_random_org` - source random numbers from RANDOM.ORG (default: `false`)
103
+
104
+ For example,
91
105
 
92
- ```ruby
106
+ ~~~ruby
93
107
  require "passphrase"
94
108
 
95
109
  # generate a passphrase with default options
@@ -110,8 +124,8 @@ Passphrase::Passphrase.new(number_of_words: 6) do |p|
110
124
  passphrase_array.map! { |array_element| p.generate.passphrase }
111
125
  end
112
126
 
113
- # generate a passphrase using only French and Italian words
114
- options = { number_of_words: 4, languages: %w( fr it ) }
127
+ # generate a four-word passphrase using only French and Italian words
128
+ options = { languages: %w( fr italian ), number_of_words: 4 }
115
129
  p = Passphrase::Passphrase.new(options)
116
130
  passphrase = p.passphrase
117
131
 
@@ -119,7 +133,7 @@ passphrase = p.passphrase
119
133
  p = Passphrase::Passphrase.new(number_of_words: 3)
120
134
  passphrase = p.passphrase
121
135
  password = passphrase.to_password
122
- ```
136
+ ~~~
123
137
 
124
138
  ## Background
125
139
  ### Diceware Method
@@ -186,10 +200,9 @@ network access, it is susceptible to network problems, and is also slower.
186
200
 
187
201
  ### Subset of languages
188
202
  By default, Passphrase randomly selects words from the collection of available
189
- languages. If desired, the selection can be limited to a subset of languages.
190
- This can be done on the command-line and in code by supplying a list of
191
- language names or abbreviations. A minimal abbreviation uses the first one or
192
- two letters of a language name, just enough to avoid ambiguity.
203
+ languages. If desired, the selection can be restricted to a subset. This can
204
+ be done on the command-line and in code by supplying a list of language names.
205
+ The names can be abbreviated to the first letter (or two, to avoid ambiguity).
193
206
 
194
207
  ### Passwords
195
208
  A typical passphrase will not satisfy password policies that require the use
@@ -214,17 +227,15 @@ compliment of 7776 entries.
214
227
  To run the command-line tool within the repository directory, try `ruby -Ilib
215
228
  bin/passphrase`. You can also experiment with the library in irb. For example,
216
229
 
217
- ```bash
218
- $ irb -Ilib -rpassphrase
219
- >> p = Passphrase::Passphrase.new(number_of_words: 3)
220
- => {:passphrase=>"jazzy vannier viscount", :number_of_words=>3, ... }
221
- >> p.passphrase
222
- => "jazzy vannier viscount"
223
- >> p.passphrase.to_password
224
- => "jazz{_2annier_vBscount"
225
- >> p = Passphrase::Passphrase.new(languages: ["e", "fr"])
226
- => {:passphrase=>"obstrua lamparos orgy forerez deduce", ... }
227
- ```
230
+ $ irb -Ilib -rpassphrase
231
+ >> p = Passphrase::Passphrase.new(number_of_words: 3)
232
+ => {:passphrase=>"jazzy vannier viscount", :number_of_words=>3, ... }
233
+ >> p.passphrase
234
+ => "jazzy vannier viscount"
235
+ >> p.passphrase.to_password
236
+ => "jazz{_2annier_vBscount"
237
+ >> p = Passphrase::Passphrase.new(languages: ["e", "fr"])
238
+ => {:passphrase=>"obstrua lamparos orgy forerez deduce", ... }
228
239
 
229
240
  Run the tests with `rake spec`.
230
241
 
@@ -4,8 +4,8 @@ module Passphrase
4
4
  # specified for a passphrase on the command-line.
5
5
  class Default
6
6
  class << self
7
- # @return [Hash] the default options that the command line interface
8
- # uses to instantiate a {Passphrase} object in {CLI.parse}
7
+ # @return [Hash] the default options used to instantiate a {Passphrase}
8
+ # object
9
9
  attr_reader :options
10
10
  # @return [Range] an arbitrary range specifying the allowable number of
11
11
  # words in a passphrase, referenced by the {CLI.parse} method
@@ -15,8 +15,8 @@ module Passphrase
15
15
  @options = {
16
16
  languages: ["all"],
17
17
  number_of_words: 5,
18
- passwordize: nil,
19
- use_random_org: nil
18
+ passwordize: false, # only relevant in {CLI.parse}
19
+ use_random_org: false
20
20
  }
21
21
  @number_range = (3..10)
22
22
  end
@@ -1,5 +1,5 @@
1
1
  module Passphrase
2
2
  # Version numbers are bumped according to {http://semver.org Semantic
3
3
  # Versioning}.
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -121,7 +121,7 @@ module Passphrase
121
121
  expect(@result.inspect).to match(
122
122
  passphrase: "passphrase",
123
123
  number_of_words: 1,
124
- use_random_org: nil,
124
+ use_random_org: false,
125
125
  word_origins: { "passphrase" => {
126
126
  language: "language",
127
127
  die_rolls: "11111"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passphrase
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Sumbar
@@ -30,7 +30,7 @@ cert_chain:
30
30
  aoKZhUfRmAZDUgzW4PMtMxO34fQDbDYevBzMcxmkHNDs87ROMOuPLWJGLcKpgGwJ
31
31
  TxzUtBfb7E+Qa/wyo0Ws7A==
32
32
  -----END CERTIFICATE-----
33
- date: 2015-04-18 00:00:00.000000000 Z
33
+ date: 2015-04-20 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sqlite3
metadata.gz.sig CHANGED
Binary file