bicrypt 1.0.0 → 1.1.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/meta/package CHANGED
@@ -1 +1,8 @@
1
- bicrypt
1
+ name: bicrypt
2
+ date: 2009-10-26
3
+ version: 1.1.0
4
+
5
+ requires:
6
+ - syckle (build)
7
+ - qed (test)
8
+
data/meta/profile ADDED
@@ -0,0 +1,21 @@
1
+ ---
2
+ title : Bicrypt
3
+ summary : Simple two-way encyrption/decryption
4
+ license : Apache 2.0
5
+ suite : rubyworks
6
+ created : 2007-07-01
7
+
8
+ authors:
9
+ - Thomas Sawyer
10
+
11
+ description:
12
+ Simple two-way encryption/decryption class.
13
+
14
+ resources:
15
+ home: http://rubydoc.info/gems/bicrypt
16
+ docs: http://rubydoc.info/gems/bicrypt
17
+ code: http://github.com/rubyworks/bicrypt
18
+
19
+ copyright:
20
+ Copyright (c) 2007 Thomas Sawyer
21
+
data/qed/01_example.rb ADDED
@@ -0,0 +1,57 @@
1
+ = BiCrypt
2
+
3
+ require 'bicrypt'
4
+
5
+ Encrypt string.
6
+
7
+ e = BiCrypt.new("akey")
8
+
9
+ m = e.encrypt_string("This is a message!")
10
+
11
+ m.assert! == "This is a message!"
12
+
13
+ Decrypt string.
14
+
15
+ d = BiCrypt.new("akey")
16
+
17
+ r = d.decrypt_string(m)
18
+
19
+ r.assert == "This is a message!"
20
+
21
+ Encrypt file.
22
+
23
+ e = BiCrypt.new("akey")
24
+
25
+ e.encrypt_file('README.rdoc', 'tmp/secret.txt')
26
+
27
+ File.read('README.rdoc').assert! == File.read('tmp/secret.txt')
28
+
29
+ Decrypt file.
30
+
31
+ d = BiCrypt.new("akey")
32
+
33
+ d.decrypt_file('tmp/secret.txt', 'tmp/README.rdoc')
34
+
35
+ File.read('README.rdoc').assert == File.read('tmp/README.rdoc')
36
+
37
+ Both the string and the file methods are built on top of the general
38
+ stream methods.
39
+
40
+ plainIO = StringIO.new("This is the message!")
41
+ cryptIO = StringIO.new('')
42
+
43
+ e = BiCrypt.new("akey")
44
+
45
+ e.encrypt_stream(plainIO, cryptIO)
46
+
47
+ Decrypt IO stream.
48
+
49
+ crypt2IO = StringIO.new(cryptIO.string)
50
+ resultIO = StringIO.new('')
51
+
52
+ d = BiCrypt.new("akey")
53
+
54
+ d.decrypt_stream(crypt2IO, resultIO)
55
+
56
+ resultIO.string.assert == "This is the message!"
57
+
@@ -0,0 +1,10 @@
1
+ require 'fileutils'
2
+ require 'stringio'
3
+
4
+ Before :demo do
5
+ if File.exist?('tmp')
6
+ FileUtils.rm_r('tmp')
7
+ end
8
+ FileUtils.mkdir('tmp')
9
+ end
10
+
metadata CHANGED
@@ -1,74 +1,104 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bicrypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 0
10
+ version: 1.1.0
5
11
  platform: ruby
6
12
  authors:
7
- - trans <transfire@gmail.com>
13
+ - Thomas Sawyer
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-09-22 00:00:00 -04:00
18
+ date: 2010-10-26 00:00:00 -04:00
13
19
  default_executable:
14
- dependencies: []
15
-
16
- description: Simple two-way encryption class.
17
- email: trans <transfire@gmail.com>
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: syckle
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: qed
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ description: Simple two-way encryption/decryption class.
50
+ email: ""
18
51
  executables: []
19
52
 
20
53
  extensions: []
21
54
 
22
55
  extra_rdoc_files:
23
- - HISTORY.rdoc
24
- - MANIFEST
25
- - LICENSE
26
56
  - README.rdoc
27
57
  files:
28
58
  - lib/bicrypt.rb
29
- - meta/authors
30
- - meta/created
31
- - meta/description
32
- - meta/homepage
33
- - meta/license
34
59
  - meta/package
35
- - meta/released
36
- - meta/repository
37
- - meta/summary
38
- - meta/version
60
+ - meta/profile
61
+ - qed/01_example.rb
62
+ - qed/applique/setup.rb
39
63
  - HISTORY.rdoc
40
64
  - LICENSE
41
65
  - README.rdoc
42
- - MANIFEST
43
66
  has_rdoc: true
44
- homepage: http://rubyworks.github.com/bicrypt
45
- licenses: []
46
-
67
+ homepage: http://rubydoc.info/gems/bicrypt
68
+ licenses:
69
+ - Apache 2.0
47
70
  post_install_message:
48
71
  rdoc_options:
49
- - --inline-source
50
72
  - --title
51
- - bicrypt api
73
+ - Bicrypt API
74
+ - --main
75
+ - README.rdoc
52
76
  require_paths:
53
77
  - lib
54
78
  required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
55
80
  requirements:
56
81
  - - ">="
57
82
  - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
58
86
  version: "0"
59
- version:
60
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
61
89
  requirements:
62
90
  - - ">="
63
91
  - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
64
95
  version: "0"
65
- version:
66
96
  requirements: []
67
97
 
68
98
  rubyforge_project: bicrypt
69
- rubygems_version: 1.3.5
99
+ rubygems_version: 1.3.7
70
100
  signing_key:
71
101
  specification_version: 3
72
- summary: Simple and quick encyrption/decryption.
102
+ summary: Simple two-way encyrption/decryption
73
103
  test_files: []
74
104
 
data/MANIFEST DELETED
@@ -1,18 +0,0 @@
1
- #!mast bin lib meta test [A-Z]*
2
- lib
3
- lib/bicrypt.rb
4
- meta
5
- meta/authors
6
- meta/created
7
- meta/description
8
- meta/homepage
9
- meta/license
10
- meta/package
11
- meta/released
12
- meta/repository
13
- meta/summary
14
- meta/version
15
- test
16
- HISTORY.rdoc
17
- LICENSE
18
- README.rdoc
data/meta/authors DELETED
@@ -1 +0,0 @@
1
- trans <transfire@gmail.com>
data/meta/created DELETED
@@ -1 +0,0 @@
1
- 2007-07-01
data/meta/description DELETED
@@ -1 +0,0 @@
1
- Simple two-way encryption class.
data/meta/homepage DELETED
@@ -1 +0,0 @@
1
- http://rubyworks.github.com/bicrypt
data/meta/license DELETED
@@ -1 +0,0 @@
1
- LGPLv3
data/meta/released DELETED
@@ -1 +0,0 @@
1
- 2009-06-26
data/meta/repository DELETED
@@ -1 +0,0 @@
1
- svn://rubyforge.org/var/svn/death/bicrypt
data/meta/summary DELETED
@@ -1 +0,0 @@
1
- Simple and quick encyrption/decryption.
data/meta/version DELETED
@@ -1 +0,0 @@
1
- 1.0.0