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

Last change on this file since 34391 was 34391, checked in by kon, 4 months ago

rel 3.2

File size: 3.2 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.2.0 : Add raw-update. [[/users/kon-lovett|Kon Lovett]]
72; 3.1.0 : Add block-length. [[/users/kon-lovett|Kon Lovett]]
73; 3.0.0 : Remove deprecated procedures. [[/users/kon-lovett|Kon Lovett]]
74; 2.1.1 : Change deprecated {{pointer}} foreign type specifier to {{scheme-pointer}} to make it work under chickens newer than 4.6.0.
75; 2.0.1 : a {{message-digest-primitive}} has no "state". [[/users/kon-lovett|Kon Lovett]]
76; 2.0.1 : fix for [[http://www.irp.oist.jp/trac/chicken/ticket/163|#163]] ([[/users/mario-domenech-goulart|Mario Domenech Goulart]])
77; 2.0.0 : Initial Chicken 4 release [[/users/kon-lovett|Kon Lovett]]
78
79
80== License
81
82 Copyright (c) 2000-2001, Aaron D. Gifford and Daishi Kato
83 All rights reserved.
84
85 Redistribution and use in source and binary forms, with or without
86 modification, are permitted provided that the following conditions
87 are met:
88
89 1. Redistributions of source code must retain the above copyright
90    notice, this list of conditions and the following disclaimer.
91 2. Redistributions in binary form must reproduce the above copyright
92    notice, this list of conditions and the following disclaimer in the
93    documentation and/or other materials provided with the distribution.
94 3. Neither the name of the copyright holder nor the names of contributors
95    may be used to endorse or promote products derived from this software
96    without specific prior written permission.
97
98 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
99 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
100 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
101 ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
102 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
103 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
104 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
105 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
106 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
107 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
108 SUCH DAMAGE.
Note: See TracBrowser for help on using the repository browser.