chibi.crypto: documentation for (chibi crypto sha-2)

Clearly state what kind of arguments sha-224 and sha-256 can handle
and what they return as a result.
This commit is contained in:
ilammy 2015-04-18 15:20:41 +03:00
parent f9c063ebe6
commit 78a57dfe83
2 changed files with 13 additions and 1 deletions

View file

@ -39,7 +39,7 @@ INCLUDES = $(BASE_INCLUDES) include/chibi/eval.h
MODULE_DOCS := ast config disasm equiv filesystem generic heap-stats io \ MODULE_DOCS := ast config disasm equiv filesystem generic heap-stats io \
loop match mime modules net pathname process repl scribble stty \ loop match mime modules net pathname process repl scribble stty \
system test time trace type-inference uri weak monad/environment \ system test time trace type-inference uri weak monad/environment \
show show/base show show/base crypto/sha2
HTML_LIBS = $(MODULE_DOCS:%=doc/lib/chibi/%.html) HTML_LIBS = $(MODULE_DOCS:%=doc/lib/chibi/%.html)

View file

@ -3,3 +3,15 @@
(import (scheme base) (srfi 33) (chibi bytevector)) (import (scheme base) (srfi 33) (chibi bytevector))
(export sha-224 sha-256) (export sha-224 sha-256)
(include "sha2.scm")) (include "sha2.scm"))
;;> \procedure{(sha-224 src)}
;;>
;;> Computes SHA-224 digest of the \var{src} which can be a string,
;;> a bytevector, or a binary input port. Returns a hexadecimal string
;;> (in lowercase).
;;> \procedure{(sha-256 src)}
;;>
;;> Computes SHA-256 digest of the \var{src} which can be a string,
;;> a bytevector, or a binary input port. Returns a hexadecimal string
;;> (in lowercase).