Help for this page

Select Code to Download


  1. or download this
    sub read_bytes {
       my ($fh, $to_read) = @_;
    ...
       my ($fh, $str) = @_;
       print $fh (pack('N', length($str)), $str);
    }
    
  2. or download this
    sub writeSubmissions {
       my ($cipher, $log_file, $str) = @_;
    ...
    my $cipher = Crypt::CBC->new({ key => $my_key, cipher => 'Rijndael' })
    +;
    
    writeSubmissions($cipher, ..., ...);
    
  3. or download this
    my $key_file = 'key_file.txt';
    my $encrypted = '...';
    ...
    while (!eof($FH_encrypted)) {
       print $FH_decrypted $cipher->decrypt(read_str($FH_encrypted));
    }