How to generate a VNC password?

From here.

#!/bin/perl

use Crypt::CBC;

my $key = pack("C8", 23, 82, 107, 6, 35, 78, 88, 7);
$cipher = Crypt::CBC->new({
'key'=>$key, 'cipher'=>'DES', 'prepend_iv'=>0, 'regenerate_key'=>0
});

$ciphertext = $cipher->encrypt("This data is hush hush");
$plaintext = $cipher->decrypt($ciphertext);

print "Encrypted: $ciphertext\n";
print "Decrypted: $plaintext\n";

Leave a Comment