X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/132a5a4a47f9dbc7c52ee15234d70258c59ccf8e..7a853280dc559b6a6d30e08daab964dcf64da62b:/lib/arcfour.c diff --git a/lib/arcfour.c b/lib/arcfour.c index 7d469d8..3450562 100644 --- a/lib/arcfour.c +++ b/lib/arcfour.c @@ -31,6 +31,15 @@ #include "arcfour.h" +/** @brief Encrypt using Arcfour stream cipher + * @param context Context structure + * @param inbuf Input buffer + * @param outbuf Output buffer + * @param length Number of bytes in @p inbuf + * + * Copies from @p inbuf to @p outbuf, encrypting (or decrypting) using + * the stream controlled by @p context. + */ void arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf, size_t length) @@ -56,6 +65,13 @@ arcfour_stream (arcfour_context * context, const char *inbuf, char *outbuf, context->idx_j = j; } +/** @brief Initialize an @ref arcfour_context + * @param context Context structure + * @param key Key data + * @param keylen Length of key + * + * Initializes @p context using @p key. + */ void arcfour_setkey (arcfour_context * context, const char *key, size_t keylen) {