Version: 5.3
SHA module
(require (planet gh/sha:1:=0/aws)) |
Provides a Racket interface to the OpenSSL implementation of SHA-1 and SHA-2.
SHA-2 includes four flavors: SHA-224, SHA-256, SHA-384, and SHA-512.
1 SHA
procedure
bstr : bytes?
procedure
bstr : bytes?
procedure
bstr : bytes?
procedure
bstr : bytes?
procedure
bstr : bytes?
Calculate the SHA hash of bstr.
2 HMAC-SHA
procedure
key : bytes? data : bytes?
procedure
key : bytes? data : bytes?
procedure
key : bytes? data : bytes?
procedure
key : bytes? data : bytes?
procedure
key : bytes? data : bytes?
HMAC-SHA encode key and data.
3 Hex string
Convert bstr to a hexadecimal string represention.
4 Predicates for contracts
Is x a bytes? of length 20?
Is x a bytes? of length 28?
Is x a bytes? of length 32?
Is x a bytes? of length 48?
Is x a bytes? of length 64?