summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-11-02 16:13:26 +0100
committerJohannes Schindelin <johannes.schindelin@gmx.de>2009-11-02 16:13:26 +0100
commitf49a292783407c14869d811c05c2bbd009af27f7 (patch)
tree5cf5e9544f6762bb67e94e195b882120a40bcf3f /libvncserver
parent67223b7c4d3411dbc5a311c7b66770f2ac9b7b83 (diff)
parent29990f0090754c722653aafd3fc6800cebc1584c (diff)
downloadlibtdevnc-f49a292783407c14869d811c05c2bbd009af27f7.tar.gz
libtdevnc-f49a292783407c14869d811c05c2bbd009af27f7.zip
Merge branch 'VeNCrypt'
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/vncauth.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libvncserver/vncauth.c b/libvncserver/vncauth.c
index b8ee288..0b73531 100644
--- a/libvncserver/vncauth.c
+++ b/libvncserver/vncauth.c
@@ -191,3 +191,18 @@ rfbEncryptBytes(unsigned char *bytes, char *passwd)
rfbDes(bytes+i, bytes+i);
}
}
+
+void
+rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) {
+ int i, j;
+ rfbDesKey(key, EN0);
+ for (i = 0; i< 8; i++)
+ where[i] ^= key[i];
+ rfbDes(where, where);
+ for (i = 8; i < length; i += 8) {
+ for (j = 0; j < 8; j++)
+ where[i + j] ^= where[i + j - 8];
+ rfbDes(where + i, where + i);
+ }
+}
+