source: project/wiki/eggref/4/sha2 @ 27938

Last change on this file since 27938 was 27938, checked in by Jim Ursetto, 8 years ago

Remove explicit wiki.call-cc.org hostname from intrawiki links

Strip hostname from all intrawiki links, making the URL relative
but leaving the path as absolute. This permits offline qwiki use.
References to /chicken-projects (egg index, RSS) were left as-is.

Also removed most percent encoding, as it's not currently handled
well by qwiki or chickadee, and spaces work fine in source URLs.

File size: 3.0 KB
Line 
1[[tags: egg]]
2
3== sha2
4
5[[toc:]]
6
7
8== Documentation
9
10Computes SHA2 checksums
11
12=== Digest Procedures
13
14Any Scheme-object can be the {{SOURCE}} for a digest.
15See [[message-digest]] for more information.
16
17==== sha256-primitive
18
19<procedure>(sha256-primitive)</procedure>
20
21Returns the 256-bit checksum primitive object.
22
23==== sha384-primitive
24
25<procedure>(sha384-primitive)</procedure>
26
27Returns the 384-bit checksum primitive object.
28
29==== sha512-primitive
30
31<procedure>(sha512-primitive)</procedure>
32
33Returns the 512-bit checksum primitive object.))
34
35
36== Usage
37
38<enscript language=scheme>
39(require-extension sha2)
40</enscript>
41
42
43== Examples
44
45<enscript highlight="scheme">
46(use sha2 message-digest)
47
48(message-digest-string (sha256-primitive) "abc")
49 ;=> "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
50</enscript>
51
52
53== Requirements
54
55[[message-digest|message-digest]]
56
57
58== Notes
59
60* For use with the [[message-digest|message-digest]] extension.
61
62
63== Author
64
65* Aaron D. Gifford, wrapped for Chicken by Daishi Kato
66* [[/users/kon-lovett|Kon Lovett]]
67
68
69== Version history
70
71; 3.0.0 : Remove deprecated procedures. [[/users/kon-lovett|Kon Lovett]]
72; 2.1.1 : Change deprecated {{pointer}} foreign type specifier to {{scheme-pointer}} to make it work under chickens newer than 4.6.0.
73; 2.0.1 : a {{message-digest-primitive}} has no "state". [[/users/kon-lovett|Kon Lovett]]
74; 2.0.1 : fix for [[http://www.irp.oist.jp/trac/chicken/ticket/163|#163]] ([[/users/mario-domenech-goulart|Mario Domenech Goulart]])
75; 2.0.0 : Initial Chicken 4 release [[/users/kon-lovett|Kon Lovett]]
76
77
78== License
79
80Copyright (c) 2000-2001, Aaron D. Gifford and Daishi Kato
81All rights reserved.
82
83Redistribution and use in source and binary forms, with or without
84modification, are permitted provided that the following conditions
85are met:
86
871. Redistributions of source code must retain the above copyright
88   notice, this list of conditions and the following disclaimer.
892. Redistributions in binary form must reproduce the above copyright
90   notice, this list of conditions and the following disclaimer in the
91   documentation and/or other materials provided with the distribution.
923. Neither the name of the copyright holder nor the names of contributors
93   may be used to endorse or promote products derived from this software
94   without specific prior written permission.
95
96THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
97ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
98IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
99ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
100FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
101DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
102OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
103HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
104LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
105OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
106SUCH DAMAGE.
Note: See TracBrowser for help on using the repository browser.