crypt-fog 0.1.0 → 1.0.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/CHANGES +12 -2
- data/MANIFEST +2 -5
- data/README +59 -11
- data/bin/quickenc +17 -2
- data/lib/crypt/fog.rb +2 -3
- data/test/tc_fog.rb +24 -17
- metadata +15 -26
- data/INSTALL +0 -7
- data/crypt-fog-0.1.0.gem +0 -0
- data/crypt-fog.gemspec +0 -21
- data/doc/fog.html +0 -56
- data/doc/fog.rd2 +0 -37
- data/doc/fog.txt +0 -53
- data/install.rb +0 -19
data/CHANGES
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
== 1.0.0 - 12-Jun-2005
|
2
|
+
* Moved project to RubyForge.
|
3
|
+
* Removed the 'doc' directory. Because the documentation is so short, that
|
4
|
+
information is now in the README file, which is rdoc friendly.
|
5
|
+
* Some test suite cleanup and added tests.
|
6
|
+
* Made documents rdoc friendly.
|
7
|
+
* Simplified install.rb.
|
8
|
+
* Removed INSTALL file. That information is now included as part of the
|
9
|
+
README file.
|
10
|
+
* Added a gemspec.
|
11
|
+
|
12
|
+
== 0.1.0 - 30-Jul-2003
|
3
13
|
- Initial release
|
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -1,14 +1,62 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
== Description
|
2
|
+
The crypt-fog package is a simple encryption mechanism, but slightly better
|
3
|
+
than Rot13. It's primary goal is to provide a reasonable amount
|
4
|
+
of obfuscation without having to resort to public/private key
|
5
|
+
exchanges, etc.
|
5
6
|
|
6
|
-
For hyper-sensitive data I recommend using a more advanced encryption
|
7
|
+
For hyper-sensitive data I recommend using a more advanced encryption
|
8
|
+
scheme.
|
7
9
|
|
8
|
-
In addition to the module, a stand-alone program is included called
|
9
|
-
that takes both a string and a number as arguments and returns
|
10
|
-
You can then copy/paste that string to a .rc file.
|
11
|
-
picked in order to decrypt it.
|
10
|
+
In addition to the module, a stand-alone program is included called
|
11
|
+
"quickenc" that takes both a string and a number as arguments and returns
|
12
|
+
your encrypted string. You can then copy/paste that string to a .rc file.
|
13
|
+
Just remember the number you picked in order to decrypt it.
|
12
14
|
|
13
|
-
Usage: ruby quickenc.rb -s "hello" -d 1688
|
14
|
-
|
15
|
+
Usage: ruby quickenc.rb -s "hello" -d 1688
|
16
|
+
ruby quickenc.rb -f "test.txt" -d 1066
|
17
|
+
|
18
|
+
Modify the shebang line as needed.
|
19
|
+
|
20
|
+
== Installation
|
21
|
+
ruby test/tc_fog.rb (optional)
|
22
|
+
ruby install.rb
|
23
|
+
|
24
|
+
== Synopsis
|
25
|
+
include Crypt
|
26
|
+
s = Fog.new("hello",2003)
|
27
|
+
p s # ";8??B"
|
28
|
+
p s.decrypt # "hello"
|
29
|
+
|
30
|
+
Fog.decrypt(";8??B",2003) # "hello"
|
31
|
+
|
32
|
+
== Constants
|
33
|
+
VERSION
|
34
|
+
The current version of the module, returned as a String.
|
35
|
+
|
36
|
+
== Class Methods
|
37
|
+
Fog.new(string, degree=13)
|
38
|
+
Creates and returns a new Fog object, which is your obfuscated string.
|
39
|
+
The degree is the value used to obfuscate the string.
|
40
|
+
|
41
|
+
Means of encryption not provided here. You'll have to look at the code. :)
|
42
|
+
|
43
|
+
Fog.decrypt(string, degree=13)
|
44
|
+
Returns a (presumably) decrypted String. Should be used when the string
|
45
|
+
comes from an external source.
|
46
|
+
|
47
|
+
== Instance Methods
|
48
|
+
Fog#decrypt
|
49
|
+
Returns a decrypted String, using the degree that was provided during
|
50
|
+
initialization.
|
51
|
+
|
52
|
+
== License
|
53
|
+
Ruby's
|
54
|
+
|
55
|
+
== Copyright
|
56
|
+
(C) 2003-2005 Daniel J. Berger
|
57
|
+
All rights reserved.
|
58
|
+
|
59
|
+
== Author
|
60
|
+
Daniel J. Berger
|
61
|
+
djberg96 at gmail dot com
|
62
|
+
imperator on IRC (irc.freenode.net)
|
data/bin/quickenc
CHANGED
@@ -1,10 +1,25 @@
|
|
1
|
-
|
1
|
+
#!/usr/local/bin/ruby
|
2
|
+
#
|
3
|
+
# This script allows you to encode a string or file using the
|
4
|
+
# crypt-fog Ruby package.
|
5
|
+
#
|
6
|
+
# Author:
|
7
|
+
# Daniel J. Berger
|
8
|
+
#
|
9
|
+
# Warranty:
|
10
|
+
# This package 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.
|
13
|
+
#
|
14
|
+
# License: Ruby's
|
15
|
+
#
|
16
|
+
# Copyright: (C) 2003-2005 Daniel J. Berger. All rights reserved.
|
2
17
|
|
3
18
|
require "getoptlong"
|
4
19
|
require "crypt/fog"
|
5
20
|
include Crypt
|
6
21
|
|
7
|
-
QUICKENC_VERSION = 1.
|
22
|
+
QUICKENC_VERSION = 1.1
|
8
23
|
|
9
24
|
def usage
|
10
25
|
print <<-HELP
|
data/lib/crypt/fog.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
module Crypt
|
2
2
|
|
3
|
-
#
|
4
|
-
|
5
|
-
module_eval("\024\035\022$$\321\367 \030\321\355\321\004%#\032\037\030\273\273\321\321\321\a\366\003\004\372\000\377\321\356\321\323\341\337\342\337\341\323\273\273\321\321\321\025\026\027\321\032\037\032%\032\022\035\032+\026\331$%#\032\037\030\335\025\026\030#\026\026\356\342\344\332\273\321\321\321\321\321\321\361\025\026\030#\026\026\321\356\321\025\026\030#\026\026\337% \020\032\321\273\321\321\321\321\321\321$%#\321\356\321\026\037\024#*!%\331$%#\032\037\030\335\025\026\030#\026\026\332\273\321\321\321\321\321\321$&!\026#\331$%#\332\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321\025\026\024#*!%\273\321\321\321\321\321\321&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\336\356\321\361\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321% \020$\273\321\321\321\321\321\321$\026\035\027\337\032\037$!\026\024%\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321$\026\035\027\337\025\026\024#*!%\331$%#\335\025\026\030#\026\026\356\342\344\332\273\321\321\321\321\321\321$%#\337&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\336\356\321\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\026\037\025\273\273\321\321\321!#\032'\022%\026\273\273\321\321\321\321\321\321\025\026\027\321\026\037\024#*!%\331$%#\356$\026\035\027\335\025\026\030#\026\026\356\361\025\026\030#\026\026\332\273\321\321\321\321\321\321\321\321\321$%#\337&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\334\356\321\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\321\321\321\026\037\025\273\273\026\037\025".unpack("C*").map{ |e| e -= 1969 }.pack("C*"))
|
3
|
+
# nyuck, nyuck, nyuck
|
4
|
+
module_eval("\024\035\022$$\321\367 \030\321\355\321\004%#\032\037\030\273\321\321\321\a\366\003\004\372\000\377\321\356\321\323\342\337\341\337\341\323\273\321\321\321\025\026\027\321\032\037\032%\032\022\035\032+\026\331$%#\032\037\030\335\321\025\026\030#\026\026\356\342\344\332\273\321\321\321\321\321\321\361\025\026\030#\026\026\321\356\321\025\026\030#\026\026\337% \020\032\273\321\321\321\321\321\321$%#\321\356\321\026\037\024#*!%\331$%#\032\037\030\335\321\025\026\030#\026\026\332\273\321\321\321\321\321\321$&!\026#\331$%#\332\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321\025\026\024#*!%\273\321\321\321\321\321\321&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\336\356\321\361\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321% \020$\273\321\321\321\321\321\321$\026\035\027\337\032\037$!\026\024%\273\321\321\321\026\037\025\273\273\321\321\321\025\026\027\321$\026\035\027\337\025\026\024#*!%\331$%#\335\321\025\026\030#\026\026\356\342\344\332\273\321\321\321\321\321\321$%#\337&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\336\356\321\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\026\037\025\273\273\321\321\321!#\032'\022%\026\273\273\321\321\321\025\026\027\321\026\037\024#*!%\331$%#\356$\026\035\027\335\321\025\026\030#\026\026\356\361\025\026\030#\026\026\332\273\321\321\321\321\321\321$%#\337&\037!\022\024\034\331\323\364\333\323\332\337\036\022!,\321-\026-\321\026\321\334\356\321\025\026\030#\026\026\321.\337!\022\024\034\331\323\364\333\323\332\273\321\321\321\026\037\025\273\026\037\025\273".unpack("C*").map{ |e| e -= 1969 }.pack("C*"))
|
6
5
|
|
7
6
|
end
|
data/test/tc_fog.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
|
1
|
+
#############################
|
2
2
|
# tc_fog.rb
|
3
3
|
#
|
4
4
|
# Test suite for crypt-fog.
|
5
|
-
|
6
|
-
|
7
|
-
Dir.chdir('..')
|
8
|
-
end
|
5
|
+
#############################
|
6
|
+
base = File.basename(Dir.pwd)
|
9
7
|
|
10
|
-
|
11
|
-
|
8
|
+
if base == "test" || base =~ /crypt-fog/
|
9
|
+
Dir.chdir("..") if base == "test"
|
10
|
+
$LOAD_PATH.unshift Dir.pwd
|
11
|
+
$LOAD_PATH.unshift Dir.pwd + "/lib"
|
12
|
+
end
|
12
13
|
|
13
14
|
require "test/unit"
|
14
15
|
require "crypt/fog"
|
@@ -19,25 +20,31 @@ class TC_Fog < Test::Unit::TestCase
|
|
19
20
|
@f = Fog.new("hello")
|
20
21
|
end
|
21
22
|
|
22
|
-
def
|
23
|
-
assert_equal("
|
23
|
+
def test_version
|
24
|
+
assert_equal("1.0.0", Fog::VERSION, "Bad version")
|
24
25
|
end
|
25
26
|
|
26
|
-
def
|
27
|
+
def test_constructor
|
27
28
|
assert_nothing_raised{ Fog.new("string") }
|
28
|
-
assert_nothing_raised{ Fog.new("string",55) }
|
29
|
+
assert_nothing_raised{ Fog.new("string", 55) }
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_class_decrypt
|
33
|
+
assert_respond_to(Fog, :decrypt)
|
29
34
|
assert_nothing_raised{ Fog.decrypt("string") }
|
30
|
-
assert_nothing_raised{ Fog.decrypt("string",66) }
|
35
|
+
assert_nothing_raised{ Fog.decrypt("string", 66) }
|
36
|
+
assert_equal("hello", Fog.decrypt(";8??B", 2003))
|
31
37
|
end
|
32
38
|
|
33
|
-
def
|
39
|
+
def test_instance_decrypt
|
40
|
+
assert_respond_to(@f, :decrypt)
|
34
41
|
assert_nothing_raised{ @f.decrypt }
|
35
|
-
|
42
|
+
assert_equal("hello", @f.decrypt)
|
36
43
|
end
|
37
44
|
|
38
|
-
def
|
39
|
-
|
40
|
-
|
45
|
+
def test_types
|
46
|
+
assert_kind_of(Crypt::Fog, @f)
|
47
|
+
assert_kind_of(String, @f.decrypt)
|
41
48
|
end
|
42
49
|
|
43
50
|
def teardown
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.10
|
3
3
|
specification_version: 1
|
4
4
|
name: crypt-fog
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version:
|
7
|
-
date:
|
8
|
-
summary: "crypt-fog is a simple encryption mechanism, but slightly better than Rot13.
|
6
|
+
version: 1.0.0
|
7
|
+
date: 2005-06-12
|
8
|
+
summary: "crypt-fog is a simple encryption mechanism, but slightly better than Rot13.
|
9
|
+
It's primary goal is to provide a reasonable amount of obfuscation without
|
10
|
+
having to resort to public/private key exchanges, etc."
|
9
11
|
require_paths:
|
10
12
|
- lib
|
11
|
-
|
12
|
-
|
13
|
-
email: djberg96@yahoo.com
|
14
|
-
homepage: http://ruby-miscutils.sourceforge.net/fog.html
|
13
|
+
email: djberg96@gmail.com
|
14
|
+
homepage: http://www.rubyforge.org/projects/shards
|
15
15
|
rubyforge_project:
|
16
|
-
description:
|
16
|
+
description: A simple encryption scheme
|
17
17
|
autorequire: crypt/fog
|
18
18
|
default_executable:
|
19
19
|
bindir: bin
|
20
|
-
has_rdoc:
|
20
|
+
has_rdoc: true
|
21
21
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
22
22
|
requirements:
|
23
23
|
-
|
@@ -26,24 +26,13 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
26
26
|
version: 0.0.0
|
27
27
|
version:
|
28
28
|
platform: ruby
|
29
|
+
authors:
|
30
|
+
- Daniel J. Berger
|
29
31
|
files:
|
30
|
-
-
|
32
|
+
- lib/crypt/fog.rb
|
33
|
+
- README
|
31
34
|
- CHANGES
|
32
|
-
- crypt-fog-0.1.0.gem
|
33
|
-
- crypt-fog.gemspec
|
34
|
-
- doc
|
35
|
-
- INSTALL
|
36
|
-
- install.rb
|
37
|
-
- lib
|
38
35
|
- MANIFEST
|
39
|
-
- README
|
40
|
-
- test
|
41
|
-
- bin/quickenc
|
42
|
-
- doc/fog.html
|
43
|
-
- doc/fog.rd2
|
44
|
-
- doc/fog.txt
|
45
|
-
- lib/crypt
|
46
|
-
- lib/crypt/fog.rb
|
47
36
|
- test/tc_fog.rb
|
48
37
|
test_files:
|
49
38
|
- test/tc_fog.rb
|
@@ -52,7 +41,7 @@ rdoc_options:
|
|
52
41
|
- README
|
53
42
|
extra_rdoc_files:
|
54
43
|
- README
|
55
|
-
-
|
44
|
+
- CHANGES
|
56
45
|
executables:
|
57
46
|
- quickenc
|
58
47
|
extensions: []
|
data/INSTALL
DELETED
data/crypt-fog-0.1.0.gem
DELETED
File without changes
|
data/crypt-fog.gemspec
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Gem::Specification.new do |s|
|
2
|
-
s.name = %q{crypt-fog}
|
3
|
-
s.version = "0.1.0"
|
4
|
-
s.date = %q{2004-11-05}
|
5
|
-
s.summary = %q{crypt-fog is a simple encryption mechanism, but slightly better
|
6
|
-
than Rot13. It's primary goal is to provide a reasonable amount
|
7
|
-
of obfuscation without having to resort to public/private key
|
8
|
-
exchanges, etc.}
|
9
|
-
s.description = s.summary
|
10
|
-
s.author = %q{Daniel J. Berger}
|
11
|
-
s.email = %q{djberg96@yahoo.com}
|
12
|
-
s.files = Dir['**/**']
|
13
|
-
s.homepage = %q{http://ruby-miscutils.sourceforge.net/fog.html}
|
14
|
-
s.autorequire = %q{crypt/fog}
|
15
|
-
s.require_paths << %q{lib}
|
16
|
-
s.bindir = "bin"
|
17
|
-
s.executables = ["quickenc"]
|
18
|
-
s.extra_rdoc_files = ["README", "doc/fog.txt"]
|
19
|
-
s.rdoc_options = ["--main", "README"]
|
20
|
-
s.test_files = ["test/tc_fog.rb"]
|
21
|
-
end
|
data/doc/fog.html
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
<?xml version="1.0" ?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
6
|
-
<head>
|
7
|
-
<title>fog.rd2</title>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<h1><a name="label:0" id="label:0">Description</a></h1><!-- RDLabel: "Description" -->
|
11
|
-
<pre>A simple string obfuscator.</pre>
|
12
|
-
<h1><a name="label:1" id="label:1">Synopsis</a></h1><!-- RDLabel: "Synopsis" -->
|
13
|
-
<pre>include Crypt
|
14
|
-
s = Fog.new("hello",2003)
|
15
|
-
p s # ";8??B"
|
16
|
-
p s.decrypt # "hello"
|
17
|
-
|
18
|
-
Fog.decrypt(";8??B",2003) # "hello"</pre>
|
19
|
-
<h1><a name="label:2" id="label:2">Constants</a></h1><!-- RDLabel: "Constants" -->
|
20
|
-
<dl>
|
21
|
-
<dt><a name="label:3" id="label:3"><code>VERSION</code></a><!-- RDLabel: "VERSION" -->
|
22
|
-
</dl>
|
23
|
-
<pre>The current version of the module, returned as a String.</pre>
|
24
|
-
<h1><a name="label:4" id="label:4">Class Methods</a></h1><!-- RDLabel: "Class Methods" -->
|
25
|
-
<dl>
|
26
|
-
<dt><a name="label:5" id="label:5"><code>Fog.new(<var>string</var>,<var>degree</var>=<var>13</var>)</code></a></dt><!-- RDLabel: "Fog.new" -->
|
27
|
-
<dd>
|
28
|
-
<p>Creates and returns a new Fog object, which is your obfuscated string.
|
29
|
-
The degree is the value used to obfuscate the string. Method not provided here.
|
30
|
-
You'll have to look at the code. :)</p></dd>
|
31
|
-
<dt><a name="label:6" id="label:6"><code>Fog.decrypt(<var>string</var>,<var>degree</var>=<var>13</var>)</code></a></dt><!-- RDLabel: "Fog.decrypt" -->
|
32
|
-
<dd>
|
33
|
-
<p>Returns a (presumably) decrypted String. Should be used when your string comes
|
34
|
-
from an external source.</p></dd>
|
35
|
-
</dl>
|
36
|
-
<h1><a name="label:7" id="label:7">Instance Methods</a></h1><!-- RDLabel: "Instance Methods" -->
|
37
|
-
<dl>
|
38
|
-
<dt><a name="label:8" id="label:8"><code>Fog#decrypt</code></a></dt><!-- RDLabel: "Fog#decrypt" -->
|
39
|
-
<dd>
|
40
|
-
<p>Returns a decrypted String, using the degree that was provided during
|
41
|
-
initialization.</p></dd>
|
42
|
-
</dl>
|
43
|
-
<h1><a name="label:9" id="label:9">Notes</a></h1><!-- RDLabel: "Notes" -->
|
44
|
-
<pre>Fog is a subclass of String.</pre>
|
45
|
-
<h1><a name="label:10" id="label:10">License</a></h1><!-- RDLabel: "License" -->
|
46
|
-
<pre>Artistic</pre>
|
47
|
-
<h1><a name="label:11" id="label:11">Copyright</a></h1><!-- RDLabel: "Copyright" -->
|
48
|
-
<pre>(C) 2003 Daniel J. Berger
|
49
|
-
All rights reserved.</pre>
|
50
|
-
<h1><a name="label:12" id="label:12">Author</a></h1><!-- RDLabel: "Author" -->
|
51
|
-
<pre>Daniel J. Berger
|
52
|
-
djberg96 at yahoo dot com
|
53
|
-
rubyhacker1 on IRC</pre>
|
54
|
-
|
55
|
-
</body>
|
56
|
-
</html>
|
data/doc/fog.rd2
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
= Description
|
3
|
-
A simple string obfuscator.
|
4
|
-
= Synopsis
|
5
|
-
include Crypt
|
6
|
-
s = Fog.new("hello",2003)
|
7
|
-
p s # ";8??B"
|
8
|
-
p s.decrypt # "hello"
|
9
|
-
|
10
|
-
Fog.decrypt(";8??B",2003) # "hello"
|
11
|
-
= Constants
|
12
|
-
--- VERSION
|
13
|
-
The current version of the module, returned as a String.
|
14
|
-
= Class Methods
|
15
|
-
--- Fog.new(string,degree=13)
|
16
|
-
Creates and returns a new Fog object, which is your obfuscated string.
|
17
|
-
The degree is the value used to obfuscate the string. Method not provided here.
|
18
|
-
You'll have to look at the code. :)
|
19
|
-
--- Fog.decrypt(string,degree=13)
|
20
|
-
Returns a (presumably) decrypted String. Should be used when your string comes
|
21
|
-
from an external source.
|
22
|
-
= Instance Methods
|
23
|
-
--- Fog#decrypt
|
24
|
-
Returns a decrypted String, using the degree that was provided during
|
25
|
-
initialization.
|
26
|
-
= Notes
|
27
|
-
Fog is a subclass of String.
|
28
|
-
= License
|
29
|
-
Artistic
|
30
|
-
= Copyright
|
31
|
-
(C) 2003 Daniel J. Berger
|
32
|
-
All rights reserved.
|
33
|
-
= Author
|
34
|
-
Daniel J. Berger
|
35
|
-
djberg96 at yahoo dot com
|
36
|
-
rubyhacker1 on IRC
|
37
|
-
=end
|
data/doc/fog.txt
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
Description
|
2
|
-
===========
|
3
|
-
A simple string obfuscator.
|
4
|
-
|
5
|
-
Synopsis
|
6
|
-
========
|
7
|
-
include Crypt
|
8
|
-
s = Fog.new("hello",2003)
|
9
|
-
p s # ";8??B"
|
10
|
-
p s.decrypt # "hello"
|
11
|
-
|
12
|
-
Fog.decrypt(";8??B",2003) # "hello"
|
13
|
-
|
14
|
-
Constants
|
15
|
-
=========
|
16
|
-
VERSION
|
17
|
-
The current version of the module, returned as a String.
|
18
|
-
|
19
|
-
Class Methods
|
20
|
-
=============
|
21
|
-
Fog.new(string,degree=13)
|
22
|
-
Creates and returns a new Fog object, which is your obfuscated string.
|
23
|
-
The degree is the value used to obfuscate the string. Method not provided here.
|
24
|
-
You'll have to look at the code. :)
|
25
|
-
|
26
|
-
Fog.decrypt(string,degree=13)
|
27
|
-
Returns a (presumably) decrypted String. Should be used when the string comes
|
28
|
-
from an external source.
|
29
|
-
|
30
|
-
Instance Methods
|
31
|
-
================
|
32
|
-
Fog#decrypt
|
33
|
-
Returns a decrypted String, using the degree that was provided during
|
34
|
-
initialization.
|
35
|
-
|
36
|
-
Notes
|
37
|
-
=====
|
38
|
-
Fog is a subclass of String.
|
39
|
-
|
40
|
-
License
|
41
|
-
=======
|
42
|
-
Artistic
|
43
|
-
|
44
|
-
Copyright
|
45
|
-
=========
|
46
|
-
(C) 2003 Daniel J. Berger
|
47
|
-
All rights reserved.
|
48
|
-
|
49
|
-
Author
|
50
|
-
======
|
51
|
-
Daniel J. Berger
|
52
|
-
djberg96 at yahoo dot com
|
53
|
-
rubyhacker1 on IRC
|
data/install.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require "rbconfig"
|
2
|
-
require "ftools"
|
3
|
-
include Config
|
4
|
-
|
5
|
-
sitedir = CONFIG['sitelibdir']
|
6
|
-
file = "lib/crypt/fog.rb"
|
7
|
-
|
8
|
-
begin
|
9
|
-
unless File.exist?("#{sitedir}/crypt")
|
10
|
-
Dir.mkdir("#{sitedir}/crypt")
|
11
|
-
end
|
12
|
-
puts "cp #{file} #{sitedir}/crypt"
|
13
|
-
File.copy(file,"#{sitedir}/crypt")
|
14
|
-
rescue => e
|
15
|
-
puts "Unable to copy files to sitelibdir [#{sitedir}]: #{e}"
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
|
19
|
-
puts "crypt-fog installed successfully"
|