]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - crypt_common.c
crypt: Move documentation to crypt.h.
[paraslash.git] / crypt_common.c
index 3bd603c0ec698ab6be9c3e48d99e7a76e52c53f0..05d71de4076cee75a6c285acc5bc0334dfe1db17 100644 (file)
@@ -247,16 +247,6 @@ int check_key_file(const char *file, bool private_key)
        return 1;
 }
 
-/**
- * Convert a hash value to ascii format.
- *
- * \param hash the hash value.
- * \param asc Result pointer.
- *
- * \a asc must point to an area of at least 2 * \p HASH_SIZE + 1 bytes which
- * will be filled by the function with the ascii representation of the hash
- * value given by \a hash, and a terminating \p NULL byte.
- */
 void hash_to_asc(unsigned char *hash, char *asc)
 {
        int i;
@@ -269,15 +259,6 @@ void hash_to_asc(unsigned char *hash, char *asc)
        asc[2 * HASH_SIZE] = '\0';
 }
 
-/**
- * Compare two hashes.
- *
- * \param h1 Pointer to the first hash value.
- * \param h2 Pointer to the second hash value.
- *
- * \return 1, -1, or zero, depending on whether \a h1 is greater than,
- * less than or equal to h2, respectively.
- */
 int hash_compare(unsigned char *h1, unsigned char *h2)
 {
        int i;
@@ -291,19 +272,6 @@ int hash_compare(unsigned char *h1, unsigned char *h2)
        return 0;
 }
 
-/**
- * Receive a buffer, decrypt it and write terminating NULL byte.
- *
- * \param scc The context.
- * \param buf The buffer to write the decrypted data to.
- * \param size The size of \a buf.
- *
- * Read at most \a size - 1 bytes from file descriptor given by \a scc, decrypt
- * the received data and write a NULL byte at the end of the decrypted data.
- *
- * \return The return value of the underlying call to \ref
- * sc_recv_bin_buffer().
- */
 int sc_recv_buffer(struct stream_cipher_context *scc, char *buf, size_t size)
 {
        int n;
@@ -317,27 +285,11 @@ int sc_recv_buffer(struct stream_cipher_context *scc, char *buf, size_t size)
        return n;
 }
 
-/**
- * Encrypt and send a \p NULL-terminated buffer.
- *
- * \param scc The context.
- * \param buf The buffer to send.
- *
- * \return The return value of the underyling call to sc_send_bin_buffer().
- */
-int sc_send_buffer(struct stream_cipher_context *scc, const char *buf)
+int sc_send_buffer(struct stream_cipher_context *scc, char *buf)
 {
        return sc_send_bin_buffer(scc, buf, strlen(buf));
 }
 
-/**
- * Format, encrypt and send a buffer.
- *
- * \param scc The context.
- * \param fmt A format string.
- *
- * \return The return value of the underyling call to sc_send_buffer().
- */
 __printf_2_3 int sc_send_va_buffer(struct stream_cipher_context *scc,
                const char *fmt, ...)
 {