Horde_Crypt_Pgp::_pgpPacketSignature PHP Method

_pgpPacketSignature() protected method

Adds some data to the pgpPacketSignature*() function array.
protected _pgpPacketSignature ( array $data, array $out ) : array
$data array See pgpPacketSignature().
$out array The return array.
return array The return array.
    protected function _pgpPacketSignature($data, $out)
    {
        /* If empty, return now. */
        if (empty($out)) {
            return $out;
        }
        $key_type = null;
        /* Store any public/private key information. */
        if (isset($data['public_key'])) {
            $key_type = 'public_key';
        } elseif (isset($data['secret_key'])) {
            $key_type = 'secret_key';
        }
        if ($key_type) {
            $out['key_type'] = $key_type;
            if (isset($data[$key_type]['created'])) {
                $out['key_created'] = $data[$key_type]['created'];
            }
            if (isset($data[$key_type]['expires'])) {
                $out['key_expires'] = $data[$key_type]['expires'];
            }
            if (isset($data[$key_type]['size'])) {
                $out['key_size'] = $data[$key_type]['size'];
            }
        }
        return $out;
    }