Help for this page

Select Code to Download


  1. or download this
    # Sender
    $cipher->start('encrypting');
    print $sock $cipher->crypt($_) while <STDIN>;
    print $sock $cipher->finish();
    
  2. or download this
    # Receiver
    $cipher->start('decrypting');
    local $/ = \4096;
    process_bytes($cipher->crypt($_)) while <$sock>;
    process_bytes($cipher->finish());
    
  3. or download this
    # Interactive receiver
    $cipher->start('decrypting');
    ...
       process_bytes($cipher->crypt($buf));
    }
    process_bytes($cipher->finish());