#!/usr/bin/perl use strict ; # Does not exist anymore in Mageia. # use GnuPG qw( :algo ) ; use Crypt::GPG ; my $gpg = new Crypt::GPG ; $gpg->gpgbin('/bin/gpg') ; $gpg->secretkey('my_email_address') ; $gpg->passphrase('my_gpg_passphrase') ; my $encryptedFile = 'myfile.tar.gz.gpg' ; my $tarFile = 'myfile.tar.gz' ; my @encryptedFileArray = () ; open(GPG_FILE, "$encryptedFile") || die "can't open file $encryptedFile !" ; @encryptedFileArray = ; close(GPG_FILE) ; my ($plaintext, $signature) = $gpg->verify("\@encryptedFileArray"); # print("$plaintext\n"); open(TAR_FILE, ">$tarFile") || die "can't open file $tarFile !" ; print(TAR_FILE $plaintext) ; close(TAR_FILE) ; exit ;