Skip to content

Commit

Permalink
Merge pull request #52 from nguyenanhung/v3.2.0-develop
Browse files Browse the repository at this point in the history
Add command_create_encryption_key
  • Loading branch information
nguyenanhung authored Sep 7, 2024
2 parents af1ed64 + 1ebecb5 commit 18877d9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions hungng/HungNG_CI_Base_Controllers.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,24 @@ protected function command_clean_cache_apc()
}
}

/**
* Function command_create_encryption_key
*
* @author : 713uk13m <[email protected]>
* @copyright: 713uk13m <[email protected]>
* @time : 09/01/2021 52:11
*/
protected function command_create_encryption_key(): void
{
if (is_cli()) {
$this->load->library('encryption');
$key = bin2hex($this->encryption->create_key(32));
ResponseOutput::writeLn($key);
exit();
}
show_404();
}

/**
* Check is human by recaptcha from request
*
Expand Down
17 changes: 17 additions & 0 deletions hungng/HungNG_CI_Base_Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,23 @@ protected function command_clean_cache_apc()
}
}

/**
* Function command_create_encryption_key
*
* @author : 713uk13m <[email protected]>
* @copyright: 713uk13m <[email protected]>
* @time : 09/01/2021 52:11
*/
protected function command_create_encryption_key(): void
{
if (is_cli()) {
$this->load->library('encryption');
$key = bin2hex($this->encryption->create_key(32));
ResponseOutput::writeLn($key);
exit();
}
show_404();
}
/**
* Check is human by recaptcha from request
*
Expand Down

0 comments on commit 18877d9

Please sign in to comment.