diff --git a/src/vCaptcha/Objects/CaptchaInstance.php b/src/vCaptcha/Objects/CaptchaInstance.php index 82dc5ba..22b5687 100644 --- a/src/vCaptcha/Objects/CaptchaInstance.php +++ b/src/vCaptcha/Objects/CaptchaInstance.php @@ -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 *