ruby-rc4 0.1.2 → 0.1.3

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 (4) hide show
  1. data/{README → README.md} +4 -5
  2. data/Rakefile +3 -3
  3. data/lib/rc4.rb +1 -2
  4. metadata +33 -54
@@ -1,9 +1,9 @@
1
- == RC4
1
+ # RC4
2
2
 
3
3
  RC4 is a pure Ruby implementation of the Rc4 algorithm.
4
4
 
5
5
 
6
- == Usage
6
+ ## Usage
7
7
 
8
8
  First require the gem:
9
9
 
@@ -23,7 +23,7 @@ To decrypt:
23
23
  Since encrypt method is used for encryption and decryption, decrypt is
24
24
  just an alias to encrypt in order to make the usage more intuitive.
25
25
 
26
- == Note
26
+ # Note
27
27
 
28
28
  The original algorithm implementation in Ruby by Max Prokopiev
29
29
  <max-prokopiev@yandex.ru>.
@@ -33,7 +33,6 @@ packaged it using gem-this.
33
33
  <asimic@gmail.com>
34
34
 
35
35
 
36
- I switched the project to use rspec2.
36
+ I switched the project to use rspec2 and am the now the project's primary maintainer.
37
37
 
38
- Thanks,
39
38
  Caige Nichols <caigesn@gmail.com>
data/Rakefile CHANGED
@@ -28,11 +28,11 @@ spec = Gem::Specification.new do |s|
28
28
  s.homepage = "http://www.caigenichols.com/"
29
29
 
30
30
  s.has_rdoc = false
31
- s.extra_rdoc_files = %w(README)
32
- s.rdoc_options = %w(--main README)
31
+ s.extra_rdoc_files = %w(README.md)
32
+ s.rdoc_options = %w(--main README.md)
33
33
 
34
34
  # Add any extra files to include in the gem
35
- s.files = %w(README Rakefile) + Dir.glob("{spec,lib/**/*}")
35
+ s.files = %w(README.md Rakefile) + Dir.glob("{spec,lib/**/*}")
36
36
  s.require_paths = ["lib"]
37
37
 
38
38
  # If you want to depend on other gems, add them here, along with any
data/lib/rc4.rb CHANGED
@@ -30,8 +30,7 @@ class RC4
30
30
  private
31
31
 
32
32
  def process(text)
33
- 0.upto(text.length-1) {|i| text[i] = text[i] ^ round}
34
- text
33
+ text.unpack("C*").map { |c| c ^ round }.pack("C*")
35
34
  end
36
35
 
37
36
  def round
metadata CHANGED
@@ -1,85 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-rc4
3
- version: !ruby/object:Gem::Version
4
- hash: 31
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 2
10
- version: 0.1.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Caige Nichols
9
+ - James Healy
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2011-02-25 00:00:00 -07:00
13
+ date: 2011-08-15 00:00:00.000000000 -07:00
19
14
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
22
17
  name: rspec
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &70216958367680 !ruby/object:Gem::Requirement
25
19
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 11
30
- segments:
31
- - 2
32
- - 1
33
- - 0
34
- version: 2.1.0
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: '0'
35
24
  type: :development
36
- version_requirements: *id001
25
+ prerelease: false
26
+ version_requirements: *70216958367680
37
27
  description:
38
28
  email: caigesn@gmail.com
39
29
  executables: []
40
-
41
30
  extensions: []
42
-
43
- extra_rdoc_files:
44
- - README
45
- files:
46
- - README
31
+ extra_rdoc_files:
32
+ - README.md
33
+ files:
34
+ - README.md
47
35
  - Rakefile
48
36
  - lib/rc4.rb
49
37
  has_rdoc: true
50
38
  homepage: http://www.caigenichols.com/
51
39
  licenses: []
52
-
53
40
  post_install_message:
54
- rdoc_options:
41
+ rdoc_options:
55
42
  - --main
56
- - README
57
- require_paths:
43
+ - README.md
44
+ require_paths:
58
45
  - lib
59
- required_ruby_version: !ruby/object:Gem::Requirement
46
+ required_ruby_version: !ruby/object:Gem::Requirement
60
47
  none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
53
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
77
58
  requirements: []
78
-
79
59
  rubyforge_project: ruby-rc4
80
- rubygems_version: 1.5.0
60
+ rubygems_version: 1.6.2
81
61
  signing_key:
82
62
  specification_version: 3
83
63
  summary: RubyRC4 is a pure Ruby implementation of the RC4 algorithm.
84
64
  test_files: []
85
-