Files
php-xmpp/src/AuthTypes/DigestMD5.php
2024-09-13 14:11:34 +02:00

17 lines
360 B
PHP

<?php
declare(strict_types=1);
namespace Pdahal\Xmpp\AuthTypes;
class DigestMD5 extends Authentication
{
protected string $name = 'DIGEST-MD5';
public function encodedCredentials(): string
{
$credentials = "\x00{$this->options->getUsername()}\x00{$this->options->getPassword()}";
return self::quote(sha1($credentials));
}
}