PHP code example of yorcreative / laravel-scanator
1. Go to this page and download the library: Download yorcreative/laravel-scanator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Scrubber\RegexCollection;
use YorCreative\Scrubber\Interfaces\RegexCollectionInterface;
class TestRegex implements RegexCollectionInterface
{
public function getPattern(): string
{
/**
* @todo
* @note return a regex pattern to detect a specific piece of sensitive data.
*/
return '(?<=basic) [a-zA-Z0-9=:\\+\/-]{5,100}';
}
public function getTestableString(): string
{
/**
* @todo
* @note return a string that can be used to verify the regex pattern provided.
*/
return 'basic f9Iu+YwMiJEsQu/vBHlbUNZRkN/ihdB1sNTU';
}
public function isSecret(): bool
{
return false;
}
}