source: project/wiki/eggref/4/message-digest @ 27994

Last change on this file since 27994 was 27994, checked in by Kon Lovett, 8 years ago

64 bit again.

File size: 21.0 KB
Line 
1[[tags: egg]]
2
3
4== message-digest
5
6[[toc:]]
7
8
9== Documentation
10
11Message Digest provides support for message digest primitives. A message-digest is
12a function taking some input source and returning a fixed-length hash.
13
14For best results the source object(s) to be accumulated into the digest should be
15something easily treated as a {{byteblock}} or, even better, a {{bytevector}}.
16
17This extension is split into many modules. The extension module ''message-digest''
18exports every other modules except ''message-digest-port''.
19
20=== Message Digest Primitive
21
22==== Usage
23
24<enscript highlight=scheme>
25(use message-digest-primitive)
26</enscript>
27
28==== Common Argument Definitions
29
30{{PRIMITIVE}} is a {{message-digest-primitive}}
31
32==== message-digest-primitive?
33
34<procedure>(message-digest-primitive? OBJ) => boolean</procedure>
35<procedure>(check-message-digest-primitive LOC OBJ [NAM])</procedure>
36<procedure>(error-message-digest-primitive LOC OBJ [NAM])</procedure>
37
38==== message-digest-primitive Accessors
39
40<procedure>(message-digest-primitive-context-info PRIMITIVE)</procedure>
41<procedure>(message-digest-primitive-digest-length PRIMITIVE)</procedure>
42<procedure>(message-digest-primitive-init PRIMITIVE)</procedure>
43<procedure>(message-digest-primitive-update PRIMITIVE)</procedure>
44<procedure>(message-digest-primitive-final PRIMITIVE)</procedure>
45<procedure>(message-digest-primitive-name PRIMITIVE)</procedure>
46
47==== make-message-digest-primitive
48
49<procedure>(make-message-digest-primitive CONTEXT-INFO DIGEST-LENGTH INIT UPDATE FINAL [NAME]) => message-digest-primitive</procedure>
50
51Create a {{message-digest-primitive}} object. The reification of a message digest
52algorithm.
53
54{{CONTEXT-INFO}} is either a {{(procedure () <context>)}}, or a
55{{positive-integer}}. When an {{integer}} a memory-block of length
56{{CONTEXT-INFO}} is allocated (and automatically free'ed).
57
58{{<context>}} is an opaque object, except when the {{CONTEXT-INFO}} is an
59{{integer}}. In which case it is known that the object is a {{pointer}} to a block
60of uninitialized memory.
61
62The {{<context>}} should be a unique object. At least the object cannot be shared
63with another ''activated'' primitive.
64
65{{DIGEST-LENGTH}} is the count of bytes in the result.
66
67The processing of a message digest is split into three phases: initialization,
68update & finalization. These are represented by three procedures: {{INIT}},
69{{UPDATE}} & {{FINAL}}, respectively.
70
71{{INIT}} is a {{(procedure (<CONTEXT>))}}. Sets up the {{<CONTEXT>}}. (Technically
72the creation of a new {{<CONTEXT>}} is part of the initialization phase but this
73detail is hidden from the user.)
74
75{{UPDATE}} is a {{(procedure (<CONTEXT> <BLOB> <COUNT>))}}. Must accumulate the
76{{<BLOB>}}. Will be called zero or more times.
77
78The foreign type specifier {{scheme-pointer}} is suitable as a foreign-lambda
79argument type for the {{<BLOB>}} argument since the data-region is a contiguous
80array of bytes.
81
82{{<COUNT>}} is the actual number of bytes in the {{<BLOB>}}. Since this value is
83supplied it means only the first {{<COUNT>}} bytes in the {{<BLOB>}} are valid.
84
85{{FINAL}} is a {{(procedure (<CONTEXT> <BLOB>))}}. Must build the message-digest
86result in the supplied result {{<BLOB>}}, which will have a length of at least
87{{DIGEST-LENGTH}}.
88
89('''Note''' that {{INIT}}, {{UPDATE}} & {{FINAL}} are side-effecting procedures!)
90
91{{NAME}} must be a {{symbol}} or a {{string}} and identifies the message digest
92algorithm. The suggested form is {{<algorithm name>-primitive}}. Example:
93{{'md5-primitive}}. The default is a nearly useless generated, uninterned
94{{symbol}}.
95
96=== Message Digest Type
97
98==== Usage
99
100<enscript highlight=scheme>
101(use message-digest-type)
102</enscript>
103
104==== Common Argument Definitions
105
106{{RESULT-FORM}} is one of:
107
108; {{'string}} : the result bytes as a string; these are raw bytes, not characters!
109; {{'hex}} : the result bytes encoded as a string of lower-case hexadecimal digits.
110; {{'blob}} : the result bytes as a blob.
111; {{'u8vector}} : the result bytes as a u8vector.
112
113{{DIGEST}} is a {{message-digest}}.
114
115{{ENDIAN}} is one of {{'big-endian}}, {{'little-endian}}.
116
117{{SOURCE}} is a Scheme object.
118
119The {{<buffer>}} argument for the update phase is translated as:
120
121; {{string}} : {{<buffer>}} = {{SOURCE}}.
122; {{blob}} : {{<buffer>}} = {{SOURCE}}.
123; {{srfi-4-vector}} : {{<buffer>}} = {{(...vector->blob/shared SOURCE)}}.
124; {{procedure}} : updates with {{<buffer>}} = {{(procedure)}} until {{#f = (procedure)}}.
125; {{input-port}} : like {{procedure}} above but from {{((message-digest-chunk-read-maker) SOURCE)}}.
126; {{*}} : {{<buffer>}} = {{(message-digest-chunk-converter SOURCE)}}.
127
128Should none of the above interpretations be available then an error is
129signaled.
130
131A {{<byte-source>}} is one of {{string}}, {{blob}}, or {{srfi-4-vector}}.
132
133==== initialize-message-digest
134
135<procedure>(initialize-message-digest PRIMITIVE) => message-digest</procedure>
136
137Returns a new, initialized {{message-digest}} for the supplied algorithm
138{{PRIMITIVE}}.
139
140Initialized here means the intialization phase is completed.
141
142==== message-digest?
143
144<procedure>(message-digest? OBJ) => boolean</procedure>
145
146<procedure>(check-message-digest LOC OBJ [NAM])</procedure>
147<procedure>(error-message-digest LOC OBJ [NAM])</procedure>
148
149==== message-digest-algorithm
150
151<procedure>(message-digest-algorithm DIGEST) => message-digest-primitive</procedure>
152
153Returns the message digest algorithm used by this {{DIGEST}}.
154
155Mostly for use when developing an update operation.
156
157Do not mess with this object!
158
159==== finalize-message-digest
160
161<procedure>(finalize-message-digest DIGEST [RESULT-FORM]) => <result></procedure>
162
163Finalize the {{DIGEST}} and return the {{<result>}} in the {{RESULT-FORM}}.
164
165{{RESULT-FORM}} default is {{'hex}}.
166
167Finalize here means the finalization phase is completed. The {{DIGEST}} is not
168in a useful state.
169
170==== setup-message-digest-buffer!
171
172<procedure>(setup-message-digest-buffer! DIGEST SIZE)</procedure>
173
174Ensure the {{DIGEST}} has a buffer of at least {{SIZE}} bytes.
175
176=== Message Digest Parameters
177
178Common handlers.
179
180Not thread specific.
181
182==== Usage
183
184<enscript highlight=scheme>
185(use message-digest-parameters)
186</enscript>
187
188==== message-digest-chunk-read-maker
189
190<procedure>(message-digest-chunk-read-maker) => CONSTRUCTOR</procedure>
191<procedure>(message-digest-chunk-read-maker CONSTRUCTOR)</procedure>
192
193Supplies the procedure used to create an input procedure.
194
195{{CONSTRUCTOR}} is a {{(procedure (INPUT-PORT #!optional SIZE)
196(procedure () <byte-source>))}}. The first argument is the chunk source port
197and the second argument is the size of chunks.
198
199The default {{CONSTRUCTOR}} will return a procedure that reads from
200{{INPUT-PORT}} in {{(message-digest-chunk-size)}} bytes.
201
202==== message-digest-chunk-size
203
204<procedure>(message-digest-chunk-size) => SIZE</procedure>
205<procedure>(message-digest-chunk-size [SIZE])</procedure>
206
207The number of bytes to read from a binary-stream during the message-digest
208update phase. Used by the default {{message-digest-chunk-read-maker}}.
209
210{{SIZE}} is a {{positive-integer}}, with default {{1024}}.
211
212==== message-digest-chunk-converter
213
214<procedure>(message-digest-chunk-converter) => CONVERTER</procedure>
215<procedure>(message-digest-chunk-converter CONVERTER)</procedure>
216
217The procedure used to translate an arbitrary object into something
218suitable for an {{UPDATE}} procedure. See {{make-message-digest-primitive}}.
219
220{{CONVERTER}} is a {{(procedure (*) <byte-source>)}}.
221
222Should the {{CONVERTER}} be {{#f}} or return {{#f}} then no translation is attempted. The
223default {{CONVERTER}} is {{#f}}.
224
225=== Message Digest BV
226
227Digest routines for string & blob.
228
229==== Usage
230
231<enscript highlight=scheme>
232(use message-digest-bv)
233</enscript>
234
235==== message-digest-update-blob
236
237<procedure>(message-digest-update-blob DIGEST BLOB)</procedure>
238
239Update the {{DIGEST}} with a {{BLOB}}.
240
241==== message-digest-update-string
242
243<procedure>(message-digest-update-string DIGEST STRING)</procedure>
244
245Update the {{DIGEST}} with a {{STRING}}.
246
247==== message-digest-update-substring (DEPRECATED)
248
249<procedure>(message-digest-update-substring DIGEST STRING START END)</procedure>
250
251Update the {{DIGEST}} with a substring {{STRING START END}}.
252
253==== message-digest-string
254
255<procedure>(message-digest-string PRIMITIVE STRING [RESULT-FORM]) => <result></procedure>
256
257Returns the {{RESULT}} for the digest algorithm {{PRIMITIVE}} applied to
258{{STRING}} in the {{RESULT-FORM}}.
259
260{{RESULT-FORM}} default is {{'hex}}.
261
262Performs all three phases.
263
264==== message-digest-blob
265
266<procedure>(message-digest-blob PRIMITIVE BLOB [RESULT-FORM]) => <result></procedure>
267
268Returns the {{<result>}} for the digest algorithm {{PRIMITIVE}} applied to
269{{BLOB}} in the {{RESULT-FORM}}.
270
271{{RESULT-FORM}} default is {{'hex}}.
272
273Performs all three phases.
274
275=== Message Digest Int
276
277Provides digest update operations for character and integer datatypes.
278
279==== Usage
280
281<enscript highlight=scheme>
282(use message-digest-int)
283</enscript>
284
285==== message-digest-update-char-u8
286
287<procedure>(message-digest-update-char-u8 DIGEST CHAR)</procedure>
288
289Update the {{DIGEST}} with the low-order 8-bits of a character {{CHAR}}.
290
291==== message-digest-update-char
292
293<procedure>(message-digest-update-char DIGEST CHAR [ENDIAN])</procedure>
294
295Update the {{DIGEST}} with a the character {{CHAR}} 32-bit integer value
296treated as {{ENDIAN}}.
297
298{{ENDIAN}} default is {{(machine-byte-order)}}.
299
300==== message-digest-update-char-be
301
302<procedure>(message-digest-update-char-be DIGEST CHAR)</procedure>
303
304Update the {{DIGEST}} with a the character {{CHAR}} 32-bit integer value
305treated as big-endian.
306
307==== message-digest-update-char-le
308
309<procedure>(message-digest-update-char-le DIGEST CHAR)</procedure>
310
311Update the {{DIGEST}} with a the character {{CHAR}} 32-bit integer value
312treated as little-endian.
313
314==== message-digest-update-u8
315
316<procedure>(message-digest-update-u8 DIGEST U8)</procedure>
317
318Update the {{DIGEST}} with an 8-bit integer {{U8}}.
319
320==== message-digest-update-u16
321
322<procedure>(message-digest-update-u16 DIGEST U16 [ENDIAN])</procedure>
323
324Update the {{DIGEST}} with a 16-bit integer {{U16}} treated as {{ENDIAN}}.
325
326{{ENDIAN}} default is {{(machine-byte-order)}}.
327
328==== message-digest-update-u16-be
329
330<procedure>(message-digest-update-u16-be DIGEST U16)</procedure>
331
332Update the {{DIGEST}} with a 16-bit integer {{U16}} treated as big-endian.
333
334==== message-digest-update-u16-le
335
336<procedure>(message-digest-update-u16-le DIGEST U16)</procedure>
337
338Update the {{DIGEST}} with a 16-bit integer {{U16}} treated as little-endian.
339
340==== message-digest-update-u32
341
342<procedure>(message-digest-update-u32 DIGEST U32 [ENDIAN])</procedure>
343
344Update the {{DIGEST}} with a 32-bit integer {{U32}} treated as {{ENDIAN}}.
345
346{{ENDIAN}} default is {{(machine-byte-order)}}.
347
348==== message-digest-update-u32-be
349
350<procedure>(message-digest-update-u32-be DIGEST U32)</procedure>
351
352Update the {{DIGEST}} with a 32-bit integer {{U32}} treated as big-endian.
353
354==== message-digest-update-u32-le
355
356<procedure>(message-digest-update-u32-le DIGEST U32)</procedure>
357
358Update the {{DIGEST}} with a 32-bit integer {{U32}} treated as little-endian.
359
360==== message-digest-update-u64
361
362<procedure>(message-digest-update-u64 DIGEST U64 [ENDIAN])</procedure>
363
364Update the {{DIGEST}} with a 64-bit integer {{U64}} treated as {{ENDIAN}}.
365
366{{ENDIAN}} default is {{(machine-byte-order)}}.
367
368==== message-digest-update-u64-be
369
370<procedure>(message-digest-update-u64-be DIGEST U64)</procedure>
371
372Update the {{DIGEST}} with a 64-bit integer {{U64}} treated as big-endian.
373
374==== message-digest-update-u64-le
375
376<procedure>(message-digest-update-u64-le DIGEST U64)</procedure>
377
378Update the {{DIGEST}} with a 64-bit integer {{U64}} treated as little-endian.
379
380=== Message Digest Update Item
381
382Provides digest update operations for Scheme objects.
383
384==== Usage
385
386<enscript highlight=scheme>
387(use message-digest-update-item)
388</enscript>
389
390==== message-digest-update-file
391
392<procedure>(message-digest-update-file DIGEST FILENAME)</procedure>
393
394Update the {{DIGEST}} with the contents of file {{FILENAME}}.
395
396==== message-digest-update-procedure
397
398<procedure>(message-digest-update-procedure DIGEST THUNK)</procedure>
399
400Update the {{DIGEST}} with a {{THUNK}} until it returns {{#f}}.
401
402{{THUNK}} is a {{(procedure () <byte-source>)}}.
403
404==== message-digest-update-port
405
406<procedure>(message-digest-update-port DIGEST INPUT-PORT)</procedure>
407
408Update the {{DIGEST}} with {{<byte-source>}} from an {{INPUT-PORT}} until
409{{#!eof}} encountered.
410
411Uses the {{message-digest-chunk-read-maker}} to create a reader for the port.
412
413==== message-digest-update-object
414
415<procedure>(message-digest-update-object DIGEST SOURCE)</procedure>
416
417Update the {{DIGEST}} with some {{SOURCE}}.
418
419{{SOURCE}} maybe an {{input-port}} (as in {{message-digest-update-port}}),
420{{procedure}} (as in {{message-digest-update-procedure}}), {{string}}, {{blob}},
421{{srfi-4-vector}}, or anything a supplied {{message-digest-chunk-converter}} recognizes &
422can convert into a {{<byte-source>}}.
423
424=== Message Digest Item
425
426Provides digest operations for whole Scheme objects.
427
428==== Usage
429
430<enscript highlight=scheme>
431(use message-digest-item)
432</enscript>
433
434==== message-digest-object
435
436<procedure>(message-digest-object PRIMITIVE SOURCE [RESULT-FORM]) => <result></procedure>
437
438Returns the {{RESULT}} for the digest algorithm {{PRIMITIVE}} applied to
439{{SOURCE}} in the {{RESULT-FORM}}.
440
441{{RESULT-FORM}} default is {{'hex}}.
442
443Performs all three phases.
444
445==== message-digest-file
446
447<procedure>(message-digest-file PRIMITIVE FILENAME [RESULT-FORM]) => <result></procedure>
448
449Returns the {{<result>}} for the digest algorithm {{PRIMITIVE}} applied to
450the file {{FILENAME}} in the {{RESULT-FORM}}. Reads until {{#!eof}} encountered.
451
452{{RESULT-FORM}} default is {{'hex}}.
453
454Performs all three phases.
455
456==== message-digest-port
457
458<procedure>(message-digest-port PRIMITIVE INPUT-PORT [RESULT-FORM]) => <result></procedure>
459
460Returns the {{<result>}} for the digest algorithm {{PRIMITIVE}} applied to
461{{INPUT-PORT}} in the {{RESULT-FORM}}. Reads until {{#!eof}} encountered.
462
463{{RESULT-FORM}} default is {{'hex}}.
464
465=== Message Digest SRFI 4
466
467Provides digest operations for SRFI-4 packed-vectors.
468
469==== Usage
470
471<enscript highlight=scheme>
472(use message-digest-srfi-4)
473</enscript>
474
475==== message-digest-update-u8vector
476
477<procedure>(message-digest-update-u8vector DIGEST U8VECTOR)</procedure>
478
479Update the {{DIGEST}} with a {{U8VECTOR}}.
480
481==== message-digest-update-subu8vector (DEPRECATED)
482
483<procedure>(message-digest-update-subu8vector DIGEST U8VECTOR START END)</procedure>
484
485Update the {{DIGEST}} with a subvector {{U8VECTOR START END}}.
486
487==== message-digest-update-bytevector (DEPRECATED)
488
489<procedure>(message-digest-update-bytevector DIGEST BYTEVECTOR [LENGTH])</procedure>
490
491Update the {{DIGEST}} with the {{BYTEVECTOR}}, a {{blob}}, {{string}}, or
492{{srfi-4-vector}}.
493
494The {{LENGTH}} is the byte count. Default is the size in bytes of the
495{{BYTEVECTOR}}.
496
497==== message-digest-u8vector
498
499<procedure>(message-digest-u8vector PRIMITIVE U8VECTOR [RESULT-FORM]) => <result></procedure>
500
501Returns the {{<result>}} for the digest algorithm {{PRIMITIVE}} applied to
502{{U8VECTOR}} in the {{RESULT-FORM}}.
503
504{{RESULT-FORM}} default is {{'hex}}.
505
506Performs all three phases.
507
508=== Message Digest Port
509
510Provides a {{port}} abstraction for a {{message-digest-primitive}}.
511
512==== Usage
513
514<enscript highlight=scheme>
515(use message-digest-port)
516</enscript>
517
518==== Common Argument Definitions
519
520{{PORT}} is a {{digest-output-port}}.
521
522==== digest-output-port
523
524<procedure>(digest-output-port? OBJ) => boolean</procedure>
525<procedure>(check-digest-output-port LOC OBJ [NAM])</procedure>
526<procedure>(error-digest-output-port LOC OBJ [NAM])</procedure>
527<procedure>(digest-output-port-name PORT) => string</procedure>
528
529==== open-output-digest
530
531<procedure>(open-output-digest PRIMITIVE) => digest-output-port</procedure>
532
533Returns a message digest output port for the supplied algorithm {{PRIMITIVE}}.
534
535The initialization phase.
536
537==== get-output-digest
538
539<procedure>(get-output-digest PORT [RESULT-TYPE 'hex]) => string</procedure>
540
541Closes the {{PORT}} and returns the result as a {{RESULT-TYPE}}.
542
543The finalization phase.
544
545==== call-with-output-digest
546
547<procedure>(call-with-output-digest PRIMITIVE PROCEDURE/1 [RESULT-FORM]) => <result></procedure>
548
549Invoke the procedure {{PROCEDURE PORT}} with {{digest-output-port}} and return
550{{<result>}} in the {{RESULT-FORM}}.
551
552{{RESULT-FORM}} default is {{'hex}}.
553
554Performs all three phases.
555
556==== with-output-to-digest
557
558<procedure>(with-output-to-digest PRIMITIVE THUNK [RESULT-FORM]) => <result></procedure>
559
560Invoke the procedure {{THUNK}} with {{(current-output-port)}} bound to a
561{{digest-output-port}} and return {{<result>}} in the {{RESULT-FORM}}.
562
563{{RESULT-FORM}} default is {{'hex}}.
564
565Performs all three phases.
566
567
568== Usage
569
570message-digest-primitive, message-digest-type, message-digest-parameters,
571message-digest-bv, message-digest-int
572
573<enscript highlight=scheme>
574(use message-digest-basic)
575</enscript>
576
577Everything in message-digest-basic plus message-digest-srfi-4,
578message-digest-update-item, message-digest-item
579
580<enscript highlight=scheme>
581(use message-digest)
582</enscript>
583
584
585== Examples
586
587Uses the message-digest port abstraction to get an MD5 digest of a string:
588
589<enscript highlight=scheme>
590(use message-digest-port)
591(use md5)    ; Or sha1, or sha2, ...
592
593(call-with-output-digest (md5-primitive) (cut display "foo" <>))
594;=> "acbd18db4cc2f85cedef654fccc4a4d8"
595</enscript>
596
597
598== Bugs and Limitations
599
600* Only messages on a byte-boundary supported. Bit-boundary messages are not handled.
601
602* The number update routines will not process an {{integer}} represented
603as anything other than a {{fixnum}} or {{flonum}}.
604
605* Since Chicken does not really have a binary port the {{digest-output-port}} will
606only accumulate strings.
607
608For example, writing a 16-bit integer is actually writing the result of
609{{number->string}} and not the 16-bit value itself! To get this effect the
610value must first be packed into a {{string}} and then written.
611
612However, the {{extras#write-byte}} routine should function as expected with a
613{{digest-output-port}}.
614
615* The chunk-converter and port-reader interface is clumsy.
616
617
618== Notes
619
620* If someone needs to construct a {{message-digest}} phase procedure that
621cannot be built upon the existing public API please contact the maintainer.
622There are some routines that can be exported to aid in such a project.
623
624It must be pointed out, though, that the message-digest port API is implemented
625using only the existing public API.
626
627* Should the default message-digest result-form be held by a ''"parameter"''
628object?
629
630
631== Requirements
632
633[[miscmacros|miscmacros]]
634[[check-errors|check-errors]]
635
636
637== Author
638
639[[/users/kon-lovett|Kon Lovett]]
640
641
642== Version history
643
644; 3.0.5 : Reverted 64 bit support.
645; 3.0.4 : Removed 64 bit support.
646; 3.0.3 :
647; 3.0.2 : Use of compiled setup-helper.
648; 3.0.1 :
649; 3.0.0 : Removed deprecated procedures to own module. Removed integer packing procedures. Split into many modules. Deprecated some procedures.
650; 2.3.8 : Treat integers as unsigned. (Ticket #534) Uses blob for finalization result buffer.
651; 2.3.7 : Remove no checks optimization compier options.
652; 2.3.6 : Deprecated close-output-digest. Restricted no checks optimization compier option.
653; 2.3.5 : The {{'u8vector}} {{RESULT-FORM}} is slightly faster. Revert to allocated context memory.
654; 2.3.4 : Try w/o C-level memory allocation so no finalizer needed.
655; 2.3.3 : The {{'blob}} {{RESULT-FORM}} is slightly faster.
656; 2.3.2 : Deprecated {{byte-string->hexadecimal}}. Deprecated {{string->hex}}, use [[string-utils]] {{string-hexadecimal#string->hex}}. Fix for the default {{message-digest-chunk-read-maker}}, blob was always chunk-size.
657; 2.3.1 : Moved some utility routines into own egg(s).
658; 2.3.0 : Added {{message-digest-update-char-u8}}, {{message-digest-update-char-be}}, and {{message-digest-update-char-le}}. {{message-digest-update-char}} now treats the actual bit-width of char correctly.
659; 2.2.0 : Added [[Byte Packing]] API. Downgraded {{message-digest-chunk-read-maker}}, {{message-digest-chunk-size}} & {{message-digest-chunk-converter}} from {{parameter}}.
660; 2.1.1 : Bug fix for hexstring: must use lowercase.
661; 2.1.0 : Added message digest "phase" and port APIs. Deprecated old API.
662; 2.0.1 : Bug fix for {{(message-digest-chunk-converter)}} use by {{make-binary-message-digest}}.
663; 2.0.0 : Release for Chicken 4 [From a diff provided by Christian Kellermann]
664
665
666== License
667
668  Copyright (C) 2006-2012 Kon Lovett.  All rights reserved.
669
670  Permission is hereby granted, free of charge, to any person obtaining a
671  copy of this software and associated documentation files (the Software),
672  to deal in the Software without restriction, including without limitation
673  the rights to use, copy, modify, merge, publish, distribute, sublicense,
674  and/or sell copies of the Software, and to permit persons to whom the
675  Software is furnished to do so, subject to the following conditions:
676
677  The above copyright notice and this permission notice shall be included
678  in all copies or substantial portions of the Software.
679
680  THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
681  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
682  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
683  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
684  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
685  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
686  OTHER DEALINGS IN THE SOFTWARE.
Note: See TracBrowser for help on using the repository browser.