Help for this page

Select Code to Download


  1. or download this
    $cipher->encrypt($data) 
    
    Encrypt data. The size of $data must be a multiple of blocksize 
    (16 bytes), otherwise this function will croak. Apart from that, 
    it can be of (almost) any length.
    
  2. or download this
    # this requires $username < 16 bytes and prefix packs with spaces
    sprintf '%16s', $username;
    ...
        my $data = shift;
      return "\0" x ( 16 - length($data)%16 ) . $data;
    }