* @revision 03 * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 3.0 Germany * @homepage http://oss.tiggerswelt.net/oscar/ * @copyright Copyright © 2009 tiggersWelt.net */ require_once ("oscar/snac.php"); require_once ("oscar/common.php"); class Oscar_SNAC_Auth_Authkey extends Oscar_SNAC { const SNAC_FAMILY = 0x0017; const SNAC_SERVICE = 0x0007; public $Key = ""; // {{{ parse /** * Parse an incoming SNAC * * @access public * @return void */ public function parse () { $Length = Oscar_Common::str2int16 ($this->Data, 0, true); $this->Key = substr ($this->Data, 0, $Length); } // }}} // {{{ generate /** * Prepare this SNAC for submission * * @access public * @return string */ public function generate () { $this->Data = Oscar_Common::int16tostr (strlen ($this->Key)) . $this->Key; return parent::generate (); } // }}} // {{{ getKey /** * Retrive the key for authentication * * @access public * @return string */ public function getKey () { return $this->Key; } // }}} } ?>