void (*init )(void *ctx);
void (*update)(void *ctx, const uint8_t *message,
size_t message_size);
- void (*final )(void *ctx, uint8_t *hash);
+ void (*final )(void *ctx, uint8_t hash[64]);
size_t ctx_size;
} crypto_sign_vtable;
.Ed
are:
.Bl -tag -width Ds
.It Fa hash
-Function that generates a 64-byte hash for a given message.
+Function that computes a 64-byte hash for a given message
+and writes the computed hash to
+.Fa hash .
The output length
.Em must
be exactly 64 bytes.
Function that updates the hash context of an outer signing context.
It must be able to handle message sizes of at least 32 bytes.
.It Fa final
-Function that finalises the hash context of an outer signing context.
+Function that finalises the hash context of an outer signing context
+and writes the computed hash to
+.Fa hash .
+The output length
+.Em must
+be exactly 64 bytes.
This function should wipe the hash context with
.Xr crypto_wipe 3monocypher
if it contains pointers to objects outside the outer signing context.
void (*hash)(uint8_t hash[64], const uint8_t *message, size_t message_size);
void (*init )(void *ctx);
void (*update)(void *ctx, const uint8_t *message, size_t message_size);
- void (*final )(void *ctx, uint8_t *hash);
+ void (*final )(void *ctx, uint8_t hash[64]);
size_t ctx_size;
} crypto_sign_vtable;