Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    GnuPG::Interface 0.44

    Download button

    No screenshots available
    Downloads: 341  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Frank J. Tobin | More programs
    Perl Artistic License / FREE
    January 10th, 2012, 13:07 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    GnuPG::Interface description

    A Perl interface to GnuPG.

    GnuPG::Interface is a Perl interface to GnuPG.

    SYNOPSIS

    # A simple example
    use IO::Handle;
    use GnuPG::Interface;

    # settting up the situation
    my $gnupg = GnuPG::Interface->new();
    $gnupg->options->hash_init( armor => 1,
    homedir => '/home/foobar' );

    # Note you can set the recipients even if you aren't encrypting!
    $gnupg->options->push_recipients( 'ftobin@cpan.org' );
    $gnupg->options->meta_interactive( 0 );

    # how we create some handles to interact with GnuPG
    my $input = IO::Handle->new();
    my $output = IO::Handle->new();
    my $handles = GnuPG::Handles->new( stdin => $input,
    stdout => $output );

    # Now we'll go about encrypting with the options already set
    my @plaintext = ( 'foobar' );
    my $pid = $gnupg->encrypt( handles => $handles );

    # Now we write to the input of GnuPG
    print $input @plaintext;
    close $input;

    # now we read the output
    my @ciphertext = ;
    close $output;

    waitpid $pid, 0;

    GnuPG::Interface and its associated modules are designed to provide an object-oriented method for interacting with GnuPG, being able to perform functions such as but not limited to encrypting, signing, decryption, verification, and key-listing parsing.

    How Data Member Accessor Methods are Created

    Each module in the GnuPG::Interface bundle relies on Class::MethodMaker to generate the get/set methods used to set the object's data members. This is very important to realize. This means that any data member which is a list has special methods assigned to it for pushing, popping, and clearing the list.

    Understanding Bidirectional Communication

    It is also imperative to realize that this package uses interprocess communication methods similar to those used in IPC::Open3 and "Bidirectional Communication with Another Process" in perlipc, and that users of this package need to understand how to use this method because this package does not abstract these methods for the user greatly. This package is not designed to abstract this away entirely (partly for security purposes), but rather to simply help create 'proper', clean calls to GnuPG, and to implement key-listing parsing. Please see "Bidirectional Communication with Another Process" in perlipc to learn how to deal with these methods.

    Using this package to do message processing generally invovlves creating a GnuPG::Interface object, creating a GnuPG::Handles object, setting some options in its options data member, and then calling a method which invokes GnuPG, such as clearsign. One then interacts with with the handles appropriately, as described in "Bidirectional Communication with Another Process" in perlipc.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl module | GnuPG Interface | Perl interface | GnuPG | module | Interface

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM