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.
This commit is contained in:
ilammy 2015-04-18 15:41:49 +03:00
parent 1f8c0088a7
commit 9088b1954c

View file

@ -1,8 +1,14 @@
(define-library (chibi crypto sha2)
(import (scheme base) (srfi 33) (chibi bytevector))
(export sha-224 sha-256)
(include "sha2.scm"))
(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)}
;;>