@@ 93,9 93,10 @@ when : = -1 : : pointer->procedure int (
;; TODO: Do I need this for a minimal implementation?
define-syntax-rule : libsodium-constant-getter name
. "Reference a libsodium constant by NAME; creates a procedure with zero arguments to get constants used in libsodium."
- define func-pointer : libsodium-func name
- define args : list ;; empty: no arguments
- pointer->procedure size_t func-pointer args
+ let :
+ define func-pointer : libsodium-func name
+ define args : list ;; empty: no arguments
+ pointer->procedure size_t func-pointer args
;; The first tool we need from libsodium is hashing data
define sodium-generichash
@@ 323,10 324,7 @@ define : unpad bv blocksize
;; decode length by treating its address as number
define unpadded-length : pointer-address : dereference-pointer *unpadded-length
;; interpret the changed memory region as bytevector.
- pointer->bytevector padded-address unpadded-length
-
-
-
+ pointer->bytevector *padded unpadded-length
define : store-data-padded bv blocksize
. "Store the bytevector BV to disk using the hash as filename,