summaryrefslogtreecommitdiff
path: root/src/eris.lisp
diff options
context:
space:
mode:
authorPiotr Szarmanski2022-09-25 20:20:59 +0200
committerPiotr Szarmanski2022-09-25 20:20:59 +0200
commite612b3d6658489fed51d6bc9a3c5c09cb60f4b74 (patch)
treee8ff57bdcaa5a5d5ea6e617f5fcf2c40ae82854f /src/eris.lisp
parent8db501749d47964b436bc63cafb80a17bfd42396 (diff)
Fix documentation.
Diffstat (limited to 'src/eris.lisp')
-rw-r--r--src/eris.lisp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/eris.lisp b/src/eris.lisp
index 5e3ed2a..0509ecb 100644
--- a/src/eris.lisp
+++ b/src/eris.lisp
@@ -194,14 +194,18 @@ read-capability object. Returns the read-capability."
(defgeneric eris-encode (input block-size output-function &key secret hash-output)
(:documentation
- "Encode an input into block-size (32kib or 1kib) blocks, that are output using
-the function output-function. This function wil be called with two arguments: an
-encoded block and a 32-byte reference octet vector.
+ "Encode an INPUT into BLOCK-SIZE (32kib or 1kib) blocks, that are output using
+the function OUTPUT-FUNCTION. This function wil be called with two arguments: an
+encoded block and a 32-byte reference octet vector. Returns a read-capability
+object.
An optional 32-byte secret can be passed for additional encryption using the
-:secret keyword."))
+SECRET keyword argument.
-(defmethod eris-encode ((input simple-array) block-size output-function &key (secret null-secret) hash-output)
+The HASH-OUTPUT keyword argument controls whether a hash-table is used to
+guarantee that a reference is only output once."))
+
+(defmethod eris-encode ((input simple-array) block-size output-function &key (secret null-secret) (hash-output t))
(declare (type block-size block-size)
(type function output-function)
(type (simple-array (unsigned-byte 8) (32)) secret))