POE-Wheel-GnuPG

 view release on metacpan or  search on metacpan

lib/POE/Wheel/GnuPG.pm  view on Meta::CPAN


        # this is important to let the decryption start. It means you have
        # finished entering the passphrase.
		$_[HEAP]{gnupg}->finished_writing_passphrase();
      },

      # This is called when you can feed input data
      ready_to_input_data => sub {
        my $input_fh = $_[ARG0];
        # In our case, we get the encrypted file handle,
        # read from it and feed the gpg input with it
        my $encrypted_fh = $_[HEAP]{encrypted_fh};
        if (eof($encrypted_fh)) {
          # if it's the end of the encrypted file, we signify to the gnupg object
          # that it's the end of input
          $_[HEAP]{gnupg}->finished_writing_input();
        } else {
          # otherwise we feed the input
		  my $line = <$encrypted_fh>;
          print $input_fh $line;
        }



( run in 2.193 seconds using v1.01-cache-2.11-cpan-df04353d9ac )