chibi-scheme/lib/chibi/crypto/sha2.sld
ilammy 9088b1954c chibi.crypto: make Chibi use native SHA-2 by default
This change concerns only Chibi. The portable implementation is
still kept around because it is... well... portable and can be
used by other Scheme implementations.
2015-04-18 17:31:46 +03:00

23 lines
660 B
Scheme

(define-library (chibi crypto sha2)
(export sha-224 sha-256)
(cond-expand
(chibi
(import (scheme base))
(include "sha2-native.scm")
(include-shared "crypto"))
(else
(import (scheme base) (srfi 33) (chibi bytevector))
(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).