mack-encryption 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,221 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Mack::Utils::Crypt::Keeper</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Mack::Utils::Crypt::Keeper</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../../files/lib/mack-encryption/keeper_rb.html">
59
+ lib/mack-encryption/keeper.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ A singleton class that holds/manages all the workers for the system.
84
+ </p>
85
+ <p>
86
+ A <a href="Keeper.html#M000004">worker</a> must be defined as
87
+ Mack::Utils::Crypt::&lt;name&gt;Worker and must define an encrypt(value)
88
+ method and a decrypt(value) method.
89
+ </p>
90
+ <p>
91
+ Example:
92
+ </p>
93
+ <pre>
94
+ class Mack::Utils::Crypt::ReverseWorker
95
+ def encrypt(x)
96
+ x.reverse
97
+ end
98
+
99
+ def decrypt(x)
100
+ x.reverse
101
+ end
102
+ end
103
+ </pre>
104
+
105
+ </div>
106
+
107
+
108
+ </div>
109
+
110
+ <div id="method-list">
111
+ <h3 class="section-bar">Methods</h3>
112
+
113
+ <div class="name-list">
114
+ <a href="#M000003">new</a>&nbsp;&nbsp;
115
+ <a href="#M000004">worker</a>&nbsp;&nbsp;
116
+ </div>
117
+ </div>
118
+
119
+ </div>
120
+
121
+
122
+ <!-- if includes -->
123
+ <div id="includes">
124
+ <h3 class="section-bar">Included Modules</h3>
125
+
126
+ <div id="includes-list">
127
+ <span class="include-name">Singleton</span>
128
+ </div>
129
+ </div>
130
+
131
+ <div id="section">
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <!-- if method_list -->
141
+ <div id="methods">
142
+ <h3 class="section-bar">Public Class methods</h3>
143
+
144
+ <div id="method-M000003" class="method-detail">
145
+ <a name="M000003"></a>
146
+
147
+ <div class="method-heading">
148
+ <a href="#M000003" class="method-signature">
149
+ <span class="method-name">new</span><span class="method-args">()</span>
150
+ </a>
151
+ </div>
152
+
153
+ <div class="method-description">
154
+ <p><a class="source-toggle" href="#"
155
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
156
+ <div class="method-source-code" id="M000003-source">
157
+ <pre>
158
+ <span class="ruby-comment cmt"># File lib/mack-encryption/keeper.rb, line 22</span>
159
+ 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
160
+ 23: <span class="ruby-ivar">@crypt_workers_cache</span> = {}
161
+ 24: <span class="ruby-keyword kw">end</span>
162
+ </pre>
163
+ </div>
164
+ </div>
165
+ </div>
166
+
167
+ <h3 class="section-bar">Public Instance methods</h3>
168
+
169
+ <div id="method-M000004" class="method-detail">
170
+ <a name="M000004"></a>
171
+
172
+ <div class="method-heading">
173
+ <a href="#M000004" class="method-signature">
174
+ <span class="method-name">worker</span><span class="method-args">(key = :default)</span>
175
+ </a>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+ <p>
180
+ Returns a <a href="Keeper.html#M000004">worker</a> object to handle the
181
+ encrytion/decryption. If the specified <a
182
+ href="Keeper.html#M000004">worker</a> doesn&#8216;t exist then <a
183
+ href="DefaultWorker.html">Mack::Utils::Crypt::DefaultWorker</a> is
184
+ returned.
185
+ </p>
186
+ <p><a class="source-toggle" href="#"
187
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
188
+ <div class="method-source-code" id="M000004-source">
189
+ <pre>
190
+ <span class="ruby-comment cmt"># File lib/mack-encryption/keeper.rb, line 29</span>
191
+ 29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">worker</span>(<span class="ruby-identifier">key</span> = <span class="ruby-identifier">:default</span>)
192
+ 30: <span class="ruby-identifier">worker</span> = <span class="ruby-ivar">@crypt_workers_cache</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>]
193
+ 31: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">worker</span>.<span class="ruby-identifier">nil?</span>
194
+ 32: <span class="ruby-identifier">worker_klass</span> = <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camelcase</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;Worker&quot;</span>
195
+ 33: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Crypt</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-identifier">worker_klass</span>)
196
+ 34: <span class="ruby-identifier">worker</span> = <span class="ruby-node">&quot;Mack::Utils::Crypt::#{worker_klass}&quot;</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>
197
+ 35: <span class="ruby-keyword kw">else</span>
198
+ 36: <span class="ruby-identifier">worker</span> = <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Crypt</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultWorker</span>.<span class="ruby-identifier">new</span>
199
+ 37: <span class="ruby-keyword kw">end</span>
200
+ 38: <span class="ruby-ivar">@crypt_workers_cache</span>[<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">worker</span>
201
+ 39: <span class="ruby-keyword kw">end</span>
202
+ 40: <span class="ruby-identifier">worker</span>
203
+ 41: <span class="ruby-keyword kw">end</span>
204
+ </pre>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+
210
+ </div>
211
+
212
+
213
+ </div>
214
+
215
+
216
+ <div id="validator-badges">
217
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
218
+ </div>
219
+
220
+ </body>
221
+ </html>
@@ -0,0 +1,190 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: String</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">String</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../files/lib/mack-encryption/string_rb.html">
59
+ lib/mack-encryption/string.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000002">decrypt</a>&nbsp;&nbsp;
90
+ <a href="#M000001">encrypt</a>&nbsp;&nbsp;
91
+ </div>
92
+ </div>
93
+
94
+ </div>
95
+
96
+
97
+ <!-- if includes -->
98
+
99
+ <div id="section">
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+ <!-- if method_list -->
109
+ <div id="methods">
110
+ <h3 class="section-bar">Public Instance methods</h3>
111
+
112
+ <div id="method-M000002" class="method-detail">
113
+ <a name="M000002"></a>
114
+
115
+ <div class="method-heading">
116
+ <a href="#M000002" class="method-signature">
117
+ <span class="method-name">decrypt</span><span class="method-args">(worker = :default)</span>
118
+ </a>
119
+ </div>
120
+
121
+ <div class="method-description">
122
+ <p>
123
+ Maps to <a href="Kernel.html">Kernel</a> _decrypt
124
+ </p>
125
+ <p>
126
+ Examples:
127
+ </p>
128
+ <pre>
129
+ some_encrypted_string.decrypt
130
+ some_encrypted_string.decrypt(:my_crypt)
131
+ </pre>
132
+ <p><a class="source-toggle" href="#"
133
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
134
+ <div class="method-source-code" id="M000002-source">
135
+ <pre>
136
+ <span class="ruby-comment cmt"># File lib/mack-encryption/string.rb, line 17</span>
137
+ 17: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decrypt</span>(<span class="ruby-identifier">worker</span> = <span class="ruby-identifier">:default</span>)
138
+ 18: <span class="ruby-identifier">_decrypt</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">worker</span>)
139
+ 19: <span class="ruby-keyword kw">end</span>
140
+ </pre>
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div id="method-M000001" class="method-detail">
146
+ <a name="M000001"></a>
147
+
148
+ <div class="method-heading">
149
+ <a href="#M000001" class="method-signature">
150
+ <span class="method-name">encrypt</span><span class="method-args">(worker = :default)</span>
151
+ </a>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+ <p>
156
+ Maps to <a href="Kernel.html">Kernel</a> _encrypt
157
+ </p>
158
+ <p>
159
+ Examples:
160
+ </p>
161
+ <pre>
162
+ &quot;Hello World&quot;.encrypt
163
+ &quot;Hello World&quot;.encrypt(:my_crypt)
164
+ </pre>
165
+ <p><a class="source-toggle" href="#"
166
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
167
+ <div class="method-source-code" id="M000001-source">
168
+ <pre>
169
+ <span class="ruby-comment cmt"># File lib/mack-encryption/string.rb, line 8</span>
170
+ 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encrypt</span>(<span class="ruby-identifier">worker</span> = <span class="ruby-identifier">:default</span>)
171
+ 9: <span class="ruby-identifier">_encrypt</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">worker</span>)
172
+ 10: <span class="ruby-keyword kw">end</span>
173
+ </pre>
174
+ </div>
175
+ </div>
176
+ </div>
177
+
178
+
179
+ </div>
180
+
181
+
182
+ </div>
183
+
184
+
185
+ <div id="validator-badges">
186
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
187
+ </div>
188
+
189
+ </body>
190
+ </html>
data/doc/created.rid ADDED
@@ -0,0 +1 @@
1
+ Mon, 25 Aug 2008 11:24:46 -0400
@@ -0,0 +1,111 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Aug 25 10:11:29 -0400 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ README
74
+ </p>
75
+ <h6>==================================================================</h6>
76
+ <p>
77
+ mack-encryption
78
+ </p>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ </div>
87
+
88
+
89
+ <!-- if includes -->
90
+
91
+ <div id="section">
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <!-- if method_list -->
101
+
102
+
103
+ </div>
104
+
105
+
106
+ <div id="validator-badges">
107
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
+ </div>
109
+
110
+ </body>
111
+ </html>