]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - crypt.h
Rename struct rc4_context and stream cipher send/receive functions.
[paraslash.git] / crypt.h
diff --git a/crypt.h b/crypt.h
index 13a5505c9f56336ac6db43ab91fbbb65f965c065..b963d1055894fa2a5919db7c6bd3b49b19ed878c 100644 (file)
--- a/crypt.h
+++ b/crypt.h
@@ -30,7 +30,7 @@ struct stream_cipher;
  * keys for the stream cipher and the file descriptor for which these keys
  * should be used.
  */
-struct rc4_context {
+struct stream_cipher_context {
        /** The socket file descriptor. */
        int fd;
        /** Key used for receiving data. */
@@ -39,14 +39,17 @@ struct rc4_context {
        struct stream_cipher *send;
 };
 
-struct stream_cipher *stream_cipher_new(const unsigned char *data, int len);
-void stream_cipher_free(struct stream_cipher *sc);
-
-int rc4_send_bin_buffer(struct rc4_context *rc4c, const char *buf, size_t len);
-int rc4_send_buffer(struct rc4_context *rc4c, const char *buf);
-__printf_2_3 int rc4_send_va_buffer(struct rc4_context *rc4c, const char *fmt, ...);
-int rc4_recv_bin_buffer(struct rc4_context *rcc, char *buf, size_t size);
-int rc4_recv_buffer(struct rc4_context *rcc, char *buf, size_t size);
+struct stream_cipher *sc_new(const unsigned char *data, int len);
+void sc_free(struct stream_cipher *sc);
+
+int sc_send_bin_buffer(struct stream_cipher_context *scc, const char *buf,
+               size_t len);
+int sc_send_buffer(struct stream_cipher_context *scc, const char *buf);
+__printf_2_3 int sc_send_va_buffer(struct stream_cipher_context *scc,
+               const char *fmt, ...);
+int sc_recv_bin_buffer(struct stream_cipher_context *scc, char *buf,
+               size_t size);
+int sc_recv_buffer(struct stream_cipher_context *scc, char *buf, size_t size);
 
 /** \cond used to distinguish between loading of private/public key */
 #define LOAD_PUBLIC_KEY 0