Beispiel #1
0
 /**
  * Test emailing a PGP encrypted email to a user
  *
  * @param array $request_data PUT data
  * @return array
  *
  * @url PUT pgp
  * @access protected
  */
 function put_pgp($request_data = NULL)
 {
     $request_data = $this->filter->run($request_data);
     if ($this->filter->hasErrors()) {
         return $this->filter->getErrorsReturn();
     }
     // make sure server is in array - no - add in extra checks
     $pgp = new PGP();
     $key = $pgp->getPublicKeyFromServer($request_data["keyserver"], USER_EMAIL);
     list($message, $subject) = $this->notify->compile("pgp_test", array());
     //$message = $pgp->encryptString($key['public_key'], $message);
     //$this->notify->email($email, $subject, $message);
     return $key;
 }