pgp-word-list 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/lib/pgp-word-list.rb +6 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e5002e05a53345b4812553aeb40e0d5102af781
4
- data.tar.gz: 930b74883ac448e62832089c5e56a033cec171df
3
+ metadata.gz: 2c599388c6fff5a1acab0072227c2629c598f0d7
4
+ data.tar.gz: a57f4e47d5a12ae05e067b77eac663aa0a029678
5
5
  SHA512:
6
- metadata.gz: 94e294cdeae7d2335e3ec1cf99448ad317101406f25edadaac3c173855228c0a2388250c22405e4c1a54a1af4ebfc5ba719d3c721921ee1993eeb57b9f9a5b6f
7
- data.tar.gz: f915d9f365ed707d3a7574693926f196f4eb9e70a832a929c908e5546e08409677d8a57cdc21e8854298950edf7afc8736f4d0e21e9cd1b1abfa9b26c53bd59b
6
+ metadata.gz: 3714c44bff201a8c930d61ba6f0c76a1b83aaccfa3a51a768d75565be28caa09dfe7487114efe19a9d815602d5be7d54408dae25137c57a407f3bbae9474fb86
7
+ data.tar.gz: fe051176357d016ce526780934f57f9c924a619cb2ab3706ff6c530c066fbc5c5357a30c0d187805ce14f3ded24b054b71ec13da52af54a3098ef87f7b7a2817
data/README.md CHANGED
@@ -8,6 +8,8 @@ I've also written a JavaScript version: [javascript-pgp-word-list](https://githu
8
8
 
9
9
  ## Usage
10
10
 
11
+ Extends `String`, `Array`, and `Integer` with `.to_pgp_words`, and `String` and `Array` with `.to_pgp_hex`.
12
+
11
13
  Available as a gem on [RubyGems](https://rubygems.org/gems/pgp-word-list).
12
14
 
13
15
  ````
@@ -16,6 +18,9 @@ require 'pgp-word-list'
16
18
  > 'D1D4 64C0 04F0 0FB5 C9A4 C8D8 E433 E7FB 7FF5 6256'.to_pgp_words
17
19
  => "stairway souvenir flytrap recipe adrift upcoming artist positive spearhead Pandora spaniel stupendous tonic concurrent transit Wichita lockup visitor flagpole escapade"
18
20
 
21
+ > 0xD1D464C004F00FB5C9A4C8D8E433E7FB7FF56256.to_pgp_words
22
+ => "stairway souvenir flytrap recipe adrift upcoming artist positive spearhead Pandora spaniel stupendous tonic concurrent transit Wichita lockup visitor flagpole escapade"
23
+
19
24
  > "stairway souvenir flytrap recipe adrift upcoming artist positive spearhead Pandora spaniel stupendous tonic concurrent transit Wichita lockup visitor flagpole escapade".to_pgp_hex
20
25
  => "D1D464C004F00FB5C9A4C8D8E433E7FB7FF56256"
21
26
 
@@ -8,6 +8,12 @@ class String
8
8
  end
9
9
  end
10
10
 
11
+ class Integer
12
+ def to_pgp_words
13
+ self.to_s(16).to_pgp_words
14
+ end
15
+ end
16
+
11
17
  class Array
12
18
  def to_pgp_words
13
19
  self.each_with_index.map{|hex, i| PGPWordList.hex_to_word(hex, i)}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgp-word-list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Guy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-30 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: PGP word list gem
14
14
  email: warren@guy.net.au