'u', 'filename' => 'stuff.txt')); /* Create a signer from the key */ $sign = new OpenPGP_Crypt_RSA($wkey); /* The message is the signed data packet */ $m = $sign->sign($data); /* Output the raw message bytes to STDOUT */ echo $m->to_bytes(); ?>