sub decryptGroupData { my($group,$password,$code) = @_; my($sql,$sth,$ret,$data,$encrypt,%decArgs,$info,@groups,$ring,$kb, +$keyid); $sql = "SELECT data, public, secret FROM gpg_user WHERE code='$code' AND active"; $sth = runSQL($sql); $ret = $sth->fetchrow_arrayref; my($pubring,$secring) = unarmourKeys($ret->[1],$ret->[2]); $ring = Crypt::OpenPGP::KeyRing->new( Data => $pubring ); $kb = $ring->find_keyblock_by_uid($code); $keyid = $kb->key->key_id_hex; $info->{keyid} = $keyid; $info->{public} = $pubring; $info->{secret} = $secring; $info->{uid} = $code; $sql = "SELECT data FROM gpg_group WHERE group_name='$group' AND active"; $sth = runSQL($sql); $ret = $sth->fetchrow_arrayref; $info->{data} = $ret->[0]; $info->{pass} = $password; my($dec,$valid,$sig) = gpgDecryptData($info); return decode_base64($dec); }
In reply to Re^3: Crypt:OpenPGP Recipients Problem
by radtad
in thread Crypt:OpenPGP Recipients Problem
by radtad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |