Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nall-chan committed Jan 17, 2024
1 parent d9268d9 commit faf83de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libs/TapoCrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ private function Handshake()
private function Login(): bool
{
$Url = \TpLink\Api\Protocol . $this->ReadPropertyString(\TpLink\Property::Host) . \TpLink\Api\Url::App;
$Payload = \TpLink\Api\Protocol::BuildRequest(
$Payload = json_encode(\TpLink\Api\Protocol::BuildRequest(
\TpLink\Api\Method::Login,
'',
[
\TpLink\Api\Param::Password => base64_encode($this->ReadPropertyString(\TpLink\Property::Password)),
\TpLink\Api\Param::Username => base64_encode(sha1($this->ReadPropertyString(\TpLink\Property::Username)))
]
);
));
$this->SendDebug(__FUNCTION__, $Payload, 0);
$tp_link_cipher = new \TpLink\Crypt\Cipher($this->TpLinkCipherKey, $this->TpLinkCipherIV);
$EncryptedPayload = $tp_link_cipher->encrypt($Payload);
Expand Down
2 changes: 1 addition & 1 deletion libs/TapoLib.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class GUID
DeviceModel::BulbL530 => self::BulbL530,
DeviceModel::BulbL610 => self::BulbL610,
DeviceModel::KH100 => self::PlugsMulti,
DeviceModel::H100 => self::PlugsMulti,
DeviceModel::H100 => self::PlugsMulti,
];

public static function GetByModel(string $Model)
Expand Down

0 comments on commit faf83de

Please sign in to comment.