-
Notifications
You must be signed in to change notification settings - Fork 1
sha2
cyclone-scheme edited this page Jul 6, 2021
·
4 revisions
Content automatically generated. Contributions from the community are very welcomed at the bottom of this file.
- Intro
- Dependencies
- Test dependencies
- Foreign dependencies
- API
- Examples
- Author(s)
- Maintainer(s)
- Version
- License
- Tags
Implementation of the SHA-2 (Secure Hash Algorithm) cryptographic hash, ported from Chibi Scheme's (chibi crypto sha2)
library.
None
None
None
Computes SHA-224 digest of the src which can be a string, a bytevector, or a binary input port. Returns a hexadecimal string (in lowercase).
Computes SHA-256 digest of the src which can be a string, a bytevector, or a binary input port. Returns a hexadecimal string (in lowercase).
;; An example program to compute SHA256 of a file
(import (scheme base) (scheme write) (cyclone crypto sha2))
(when (null? (command-line-arguments))
(display "Usage: sha256sum-cyc FILE")
(newline)
(exit 1))
(display
(sha-256 (open-binary-input-file (car (command-line-arguments)))))
(display " ")
(display (car (command-line-arguments)))
(newline)
Alex Shinn, Alexei Lozovsky
Justin Ethier
"0.3.0"
BSD
crypto networking hash