From 9088b1954c483ecc53528965869c3a52b2173018 Mon Sep 17 00:00:00 2001 From: ilammy Date: Sat, 18 Apr 2015 15:41:49 +0300 Subject: [PATCH] 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. --- lib/chibi/crypto/sha2.sld | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/chibi/crypto/sha2.sld b/lib/chibi/crypto/sha2.sld index 7079d727..6aa17072 100644 --- a/lib/chibi/crypto/sha2.sld +++ b/lib/chibi/crypto/sha2.sld @@ -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)} ;;>