VNC/DES version 0.01
====================

Perl module to interface to the VNC D3DES calls for encrypting and
decrypting passwords for use with VNC.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

-------------------------------------------------------------------

DES(3)         User Contributed Perl Documentation         DES(3)

NAME
       VNC::DES - Perl extension for using the VNC D3DES functions.

SYNOPSIS
         use VNC::DES;

         my $key = "password";
         my $ciphertext = "data1234";
         my $encrypted = "";
         my $decoded = "";

         deskey($key, 0);   # 0 at end is for encryption mode
         des($ciphertext, $encrypted);

         ($encrypted) = $encrypted =~ /^(.{8,8})/;

         deskey($key, 1);   # 1 at end is for encryption mode
         des($encrypted, $decoded);

         ($decoded) = $decoded =~ /^(.{8,8})/;

DESCRIPTION

       Quick encapsulation of the VNC D3DES routines for use in perl.
       Probably really broken, but it worked for my purposes.

       Both keys and text blocks need to be padded to 8 bytes.  I use
       a regex to truncate output returned from the cipher to 8 bytes
       as well.  

       Exported functions

         des(text, buffer)
           encrypt/decrypt the data from _text_ to _buffer_.

         deskey(key, mode)  # mode 0 is encryption, 1 is decryption
           set the internal state key to _key_, and set the current
           DES mode.

         cpkey(into)
           copy the current prepared key out to _into_.

         usekey(from)
           take a pre-pared key from _from_ and make it the current key.

AUTHOR
       Stephen Milton<steve@milton.com>

       D3DES functions are copyright Richard Outerbridge and AT&T
       Laboratories.  See d3des.c and d3des.h for copyright
       information.

       The d3des.c and d3des.h files are directly from the GPL'd VNC
       version 3.3.3r2 release.

SEE ALSO
       the perl manpage.
