# Interactive receiver $cipher->start('decrypting'); for (;;) { my $rv = sysread($sock, my $buf='', 4096); die $! if !defined $rv last if !$rv; process_bytes($cipher->crypt($buf)); } process_bytes($cipher->finish());