Added method generateNewSecret() in \vCaptcha\Objects

This commit is contained in:
Zi Xing 2022-01-26 19:08:34 -05:00
parent d65f9ae897
commit 8ed19d25e3
1 changed files with 11 additions and 0 deletions

View File

@ -5,6 +5,7 @@
namespace vCaptcha\Objects;
use vCaptcha\Abstracts\CaptchaType;
use vCaptcha\Classes\Security;
use vCaptcha\Objects\CaptchaInstance\FirewallOptions;
class CaptchaInstance
@ -72,6 +73,16 @@
*/
public $CreatedTimestamp;
/**
* Generates a new secret key for this captcha instance
*
* @return void
*/
public function generateNewSecret()
{
$this->SecretKey = Security::generateCaptchaInstanceSecret($this->ID, $this->OwnerID);
}
/**
* Returns an array representation of the object
*