From 29990f0090754c722653aafd3fc6800cebc1584c Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Wed, 7 Oct 2009 11:01:55 +0800 Subject: Add MSLogon security type Signed-off-by: Vic Lee Signed-off-by: Johannes Schindelin --- libvncserver/vncauth.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libvncserver') 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); + } +} + -- cgit v1.2.1