Initial commit
This commit is contained in:
16
src/AuthTypes/DigestMD5.php
Normal file
16
src/AuthTypes/DigestMD5.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user