Hi there,
I am trying to create several encrypted files using different keys. The public keys were imported on the keyring using gpg and look fine to me. I run a process that throws data into a buffer which is then passed to Crypt-OpenPGP for encryption. For a couple of keys the encryption process seems to go into a loop and the encrypted file never gets created.
my $pgp = Crypt::OpenPGP->new(PubRing => $config->cfg('pubkeys'));
# $buffer will become the data in the output file
my $buffer;
## Fill $buffer here ##
# Encrypt the data
$pgp->encrypt(
Data => $buffer,
Armour => 1,
Recipients => $key_id,
);
Most of the time this produces an ASCII Armored file, but in a few small cases the process hangs during encryption.
All we require of our clients is that they send us a public key to be used to encrypt data specifically for them.
|