kaiopiola/keygen-package: Gerador de chaves com padrões de caracteres
▻https://github.com/kaiopiola/keygen-package
The #Keygen plugin is a key or serial generator based on user-defined mask patterns. The plugin is able to generate keys 6W2F-4RJB-KV0Z-ADA6-4SJ2
# Instantiating class in a variable:
$exampleKey = new Key;
# Setting parameters:
$exampleKey->setPattern("XXXX-NNNN-LLLL"); // Defines the pattern that the code will use to define its new key.
// The letters represent the type of content that can be used in that space, as per the rule:
// X - Any letter or number
// N - Numbers only as defined
// L - Letters only as defined
// Any other characters like dashes, dots, slashes, and even other letters and numbers, will not be replaced.
// If this property is not defined, the following will be used by default: XXXXX-XXXXX-XXXXX
$exampleKey->setNumbers("789"); // Defines the numbers that can compose your key, if not defined, it will use by default "0123456789"
$exampleKey->setLetters("ABC"); // Defines the letters that can compose your key, if not defined, it will use by default "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
$exampleKey->generate(); // Generate your key and return a string value with the result
#php