summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5957ec3)
unlike openssl's RC4(), the RC4 implemenation of libgcrypt can encrypt
a buffer in-place. For this the "buf" argument of the various send
and receive functions must not be const.
*
* \sa \ref write_all(), RC4(3).
*/
*
* \sa \ref write_all(), RC4(3).
*/
-int sc_send_bin_buffer(struct stream_cipher_context *scc, const char *buf,
+int sc_send_bin_buffer(struct stream_cipher_context *scc, char *buf,
};
struct stream_cipher *sc_new(const unsigned char *data, int len);
void sc_free(struct stream_cipher *sc);
};
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,
+int sc_send_bin_buffer(struct stream_cipher_context *scc, char *buf,
-int sc_send_buffer(struct stream_cipher_context *scc, const char *buf);
+int sc_send_buffer(struct stream_cipher_context *scc, 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,
__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,
*
* \return The return value of the underyling call to sc_send_bin_buffer().
*/
*
* \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));
}
{
return sc_send_bin_buffer(scc, buf, strlen(buf));
}