* @revision 03 * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons Attribution-Share Alike 2.0 Germany * @homepage http://oss.tiggerswelt.net/oscar/ * @copyright Copyright © 2009 tiggersWelt.net */ require_once ("oscar/tlv/helper/string.php"); class Oscar_TLV_Logon_Password extends Oscar_TLV_Helper_String { /* Type of this TLV */ const TYPE = 0x0025; const MD5_STRING = "AOL Instant Messenger (SM)"; // {{{ __construct /** * Construct this TLV * * @param object $Parent (optional) * @param string $Password (optional) * @param string $Key (optional) * * @access friendly * @return void */ function __construct ($Parent = null, $Password = null, $Key = null) { // Inherit to our parent parent::__construct ($Parent, self::TYPE); // Set password if (($Password !== null) && ($Key !== null)) $this->setPassword ($Password, $Key); } // }}} // {{{ setPassword /** * Set password for this TLV * * @param string $Password * @param string $Key * * @access public * @return void */ public function setPassword ($Password, $Key) { $this->Value = md5 ($Key . md5 ($Password, true) . self::MD5_STRING, true); } // }}} } ?>