function to_bytes()
{
$bytes = chr($this->type);
switch ($this->type) {
case 0:
$bytes .= chr($this->hash_algorithm);
break;
case 1:
$bytes .= chr($this->hash_algorithm);
$bytes .= $this->salt;
break;
case 3:
$bytes .= chr($this->hash_algorithm);
$bytes .= $this->salt;
$bytes .= chr(OpenPGP::encode_s2k_count($this->count));
break;
}
return $bytes;
}