* @param string $confirmPassword
* @throws UserInputException
*/
- protected function validatePassword($password, $confirmPassword)
- {
+ protected function validatePassword(
+ #[\SensitiveParameter]
+ $password,
+ #[\SensitiveParameter]
+ $confirmPassword
+ ) {
if (empty($password)) {
throw new UserInputException('password');
}
/**
* @inheritDoc
*/
- protected function validatePassword($password, $confirmPassword)
- {
+ protected function validatePassword(
+ #[\SensitiveParameter]
+ $password,
+ #[\SensitiveParameter]
+ $confirmPassword
+ ) {
if (!empty($password) || !empty($confirmPassword)) {
parent::validatePassword($password, $confirmPassword);
}
* @param string $method
* @return string
*/
- public function createSignature($url, array $parameters, $tokenSecret = '', $method = 'POST')
- {
+ public function createSignature(
+ $url,
+ array $parameters,
+ #[\SensitiveParameter]
+ $tokenSecret = '',
+ $method = 'POST'
+ ) {
$tmp = [];
foreach ($parameters as $key => $val) {
$tmp[\rawurlencode($key)] = \rawurlencode($val);
* @param string $password
* @param bool $saveCredentials
*/
- public static function storeAuthData($packageUpdateServerID, $username, $password, $saveCredentials = false)
- {
+ public static function storeAuthData(
+ $packageUpdateServerID,
+ $username,
+ #[\SensitiveParameter]
+ $password,
+ $saveCredentials = false
+ ) {
$packageUpdateAuthData = @\unserialize(WCF::getSession()->getVar('packageUpdateAuthData'));
if ($packageUpdateAuthData === null || !\is_array($packageUpdateAuthData)) {
$packageUpdateAuthData = [];
*
* @since 5.4
*/
- private static function getPasswordHash(?string $password = null): string
- {
+ private static function getPasswordHash(
+ #[\SensitiveParameter]
+ ?string $password = null
+ ): string {
$manager = PasswordAlgorithmManager::getInstance();
$algorithm = $manager->getDefaultAlgorithm();
/**
* @inheritDoc
*/
- protected function validatePassword($password, $confirmPassword)
- {
+ protected function validatePassword(
+ #[\SensitiveParameter]
+ $password,
+ #[\SensitiveParameter]
+ $confirmPassword
+ ) {
if (!$this->isExternalAuthentication) {
parent::validatePassword($password, $confirmPassword);
public function __construct(
$host,
$user,
+ #[\SensitiveParameter]
$password,
$database,
$port,
$host = MAIL_SMTP_HOST,
$port = MAIL_SMTP_PORT,
$username = MAIL_SMTP_USER,
+ #[\SensitiveParameter]
$password = MAIL_SMTP_PASSWORD,
$starttls = MAIL_SMTP_STARTTLS
) {
public function setData(
$databaseHost,
$databaseUser,
+ #[\SensitiveParameter]
$databasePassword,
$databaseName,
$databasePrefix,
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return \password_verify($password, $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return \password_hash($password, \PASSWORD_ARGON2I, self::OPTIONS);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return \password_verify($password, $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return \password_hash($password, \PASSWORD_BCRYPT, $this->getOptions());
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
// The passwords are stored differently when importing. Sometimes they are saved with the salt,
// but sometimes also without the salt. We don't need the salt, because the salt is saved with the hash.
[$hash] = \explode(':', $hash, 2);
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = '$1$' . Hex::encode(\random_bytes(6)) . '$';
return $this->hashWithSalt($password, $salt);
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \crypt($password, $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return \hash_equals($hash, self::getDoubleSaltedHash($password, $hash));
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return self::getDoubleSaltedHash($password);
}
* @param string $salt
* @return string
*/
- private static function getDoubleSaltedHash($password, $salt = null)
- {
+ private static function getDoubleSaltedHash(
+ #[\SensitiveParameter]
+ $password,
+ $salt = null
+ ) {
if ($salt === null) {
$salt = self::getRandomSalt();
}
* @param string $salt
* @return string
*/
- private static function getSaltedHash($password, $salt = null)
- {
+ private static function getSaltedHash(
+ #[\SensitiveParameter]
+ $password,
+ $salt = null
+ ) {
if ($salt === null) {
$salt = self::getRandomSalt();
}
/**
* Returns the hashed password, with the given settings.
*/
- private function hashDrupal(string $password, string $settings): string
- {
+ private function hashDrupal(
+ #[\SensitiveParameter]
+ string $password,
+ string $settings
+ ): string {
$output = $this->hashPhpass($password, $settings);
return \mb_substr($output, 0, 55, '8bit');
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
// The passwords are stored differently when importing. Sometimes they are saved with the salt,
// but sometimes also without the salt. We don't need the salt, because the salt is saved with the hash.
[$hash] = \explode(':', $hash, 2);
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(4));
return $this->hashDrupal($password, $this->getSettings() . $salt) . ':';
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return false;
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return '';
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($password) . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($salt) . \md5($password));
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5($password . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5($password . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5($password . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($salt) . \md5($password));
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(4));
return $this->hashPhpass($password, $this->getSettings() . $salt) . ':';
verify as phpassVerify;
}
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
if ($this->phpassVerify($password, $hash)) {
return true;
}
return false;
}
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
throw new NotImplementedException();
}
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($password) . \md5($salt));
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \sha1($salt . $password);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \sha1($salt . $password);
}
/**
* Returns the hashed password, with the given settings.
*/
- private function hashPhpass(string $password, string $settings): string
- {
+ private function hashPhpass(
+ #[\SensitiveParameter]
+ string $password,
+ string $settings
+ ): string {
$output = '*';
// Check for correct hash
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
// The passwords are stored differently when importing. Sometimes they are saved with the salt,
// but sometimes also without the salt. We don't need the salt, because the salt is saved with the hash.
[$hash] = \explode(':', $hash, 2);
/**
* @deprecated 5.5 Use Phpass::hash() instead.
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$settings = '$H$8';
$settings .= Hex::encode(\random_bytes(4));
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($password) . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($password) . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \md5(\md5($password) . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return $this->argon2->verify(\md5($password), $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return $this->argon2->hash(\md5($password));
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return $this->bcrypt->verify(\md5($password), $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return $this->bcrypt->hash(\md5($password));
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
if (\hash_equals($hash, \md5($password))) {
return true;
} elseif (\hash_equals($hash, \sha1($password))) {
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return \sha1($password);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \sha1($salt . \sha1($salt . \sha1($password)));
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
$hash = '';
if ($this->enableSalting) {
if ($this->saltPosition === 'b') {
/**
* Encrypts a given string with the used encryption method.
*/
- private function encrypt(string $string): string
- {
+ private function encrypt(
+ #[\SensitiveParameter]
+ string $string
+ ): string {
switch ($this->encryptionMethod) {
case 'c':
return \crc32($string);
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return $this->doubleBcrypt->verify($password, $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return $this->doubleBcrypt->hash($password);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
$parts = \explode(':', $hash, 2);
$hash = $parts[0];
$salt = $parts[1] ?? '';
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
$salt = Hex::encode(\random_bytes(20));
return $this->hashWithSalt($password, $salt) . ':' . $salt;
/**
* Returns the hashed password, hashed with a given salt.
*/
- private function hashWithSalt(string $password, string $salt): string
- {
+ private function hashWithSalt(
+ #[\SensitiveParameter]
+ string $password,
+ string $salt
+ ): string {
return \hash('sha256', \hash('sha256', $password) . $salt);
}
/**
* @inheritDoc
*/
- public function verify(string $password, string $hash): bool
- {
+ public function verify(
+ #[\SensitiveParameter]
+ string $password,
+ string $hash
+ ): bool {
return $this->bcrypt->verify($password, $hash);
}
/**
* @inheritDoc
*/
- public function hash(string $password): string
- {
+ public function hash(
+ #[\SensitiveParameter]
+ string $password
+ ): string {
return $this->bcrypt->hash($password);
}
*/
private $secret;
- public function __construct(string $secret)
- {
+ public function __construct(
+ #[\SensitiveParameter]
+ string $secret
+ ) {
$this->secret = $secret;
}