summaryrefslogtreecommitdiff
path: root/src/eris.lisp
diff options
context:
space:
mode:
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))