summaryrefslogtreecommitdiffstats
path: root/common/rfbcrypto.h
diff options
context:
space:
mode:
authorChristian Beier <[email protected]>2018-06-29 12:30:17 +0200
committerChristian Beier <[email protected]>2018-06-29 12:30:17 +0200
commit85fb69515cf1739bea53ce62b832a17e08ab3647 (patch)
tree0b4bb1faf2f1ae9d0ed67d36cf119a1b50f7475e /common/rfbcrypto.h
parent161e7cab026dd89dacd85208b74834cc4c509f72 (diff)
downloadlibtdevnc-85fb69515cf1739bea53ce62b832a17e08ab3647.tar.gz
libtdevnc-85fb69515cf1739bea53ce62b832a17e08ab3647.zip
crypto: move to common
As of now, only LibVNCServer makes uses of these digest functions _and_ they depend on sys/uio.h, but in the future LibVNCClient will need those as well.
Diffstat (limited to 'common/rfbcrypto.h')
-rw-r--r--common/rfbcrypto.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/rfbcrypto.h b/common/rfbcrypto.h
new file mode 100644
index 0000000..fec095e
--- /dev/null
+++ b/common/rfbcrypto.h
@@ -0,0 +1,16 @@
+#ifndef _RFB_CRYPTO_H
+#define _RFB_CRYPTO_H 1
+
+#include "rfb/rfbconfig.h"
+
+#define SHA1_HASH_SIZE 20
+#define MD5_HASH_SIZE 16
+
+#ifdef LIBVNCSERVER_HAVE_SYS_UIO_H
+#include <sys/uio.h>
+
+void digestmd5(const struct iovec *iov, int iovcnt, void *dest);
+void digestsha1(const struct iovec *iov, int iovcnt, void *dest);
+#endif
+
+#endif