chibi-scheme/lib/chibi/crypto/sha2.sld
ilammy db2b598cde chibi.crypto: code style fixes
- Fixed some typos in sha-native.scm
- Removed unnecessary structs and unions from sha_context
- Used more efficient implementation of hex32
- Made (scheme base) a common import in (chibi crypto sha2)
2015-04-19 16:01:07 +03:00

23 lines
644 B
Scheme

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