my $What = "Some text to be encrypted."; my $Length = length ( $What ) * 2; my $Cipher = Crypt::CBC->new ( [ key => $DBITT::CryptString ] ); my $CipherText = $Cipher->encrypt ( $What ); my $ASCII = unpack ( "H$Length", $CipherText ); print "Encrypted result of $What is $ASCII."; print " That was " . length ( $ASCII ) . " bytes long.\n"; my $PlainText = $Cipher->decrypt ( $CipherText ); print "And back into the real world we have '$PlainText'.\n"; $PlainText = $Cipher->decrypt ( pack ( "H$Length", $ASCII ) ); print "Try via ASCII string it's '$PlainText'.\n"; #### Encrypted result of Some text to be encrypted. is 52616e646f6d49568bd87928f7ccbbbef6b6fcd504407b611fd9. That was 52 bytes long. And back into the real world we have 'Some text to be encrypted.'. Try via ASCII string it's ''.