lib:crypto: Document samba_gnutls_arcfour_confounded_md5()
authorAndreas Schneider <asn@samba.org>
Thu, 18 Jul 2019 11:33:54 +0000 (13:33 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 26 Jul 2019 01:48:22 +0000 (01:48 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/crypto/gnutls_helpers.h

index 5fd9a4d2d671404bb85b5787ff8ba2b555ffab2d..45dec2b5db65c6da586cfc0b62532b2949c9cc1c 100644 (file)
@@ -85,6 +85,24 @@ enum samba_gnutls_direction {
        SAMBA_GNUTLS_DECRYPT
 };
 
+/**
+ * @brief Encrypt or decrypt a data blob using RC4 with a key and salt.
+ *
+ * One of the key input should be a session key and the other a confounder
+ * (aka salt). Which one depends on the implementation details of the
+ * protocol.
+ *
+ * @param[in]  key_input1 Either a session_key or a confounder.
+ *
+ * @param[in]  key_input2 Either a session_key or a confounder.
+ *
+ * @param[in]  data       The data blob ot either encrypt or decrypt. The data
+ *                        will be encrypted or decrypted in place.
+ *
+ * @param[in]  encrypt    The encryption direction.
+ *
+ * @return A gnutls error code.
+ */
 int samba_gnutls_arcfour_confounded_md5(const DATA_BLOB *key_input1,
                                        const DATA_BLOB *key_input2,
                                        DATA_BLOB *data,