hereismhtm / pin-puzzle
Personal Identification Number (PIN) transformer into three separate secret parts, assemble them back together to get your PIN
v1.0.0
2023-08-16 14:30 UTC
Requires
- php: >=8.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Personal Identification Number (PIN) transformer into three separate secret parts, assemble them back together to get your PIN.
Requirements
PHP 8.2+
Get Started
Install via composer
composer require hereismhtm/pin-puzzle
composer update
Usage
use PinPuzzle\PinPuzzle; $pin = '1234'; $pzl = new PinPuzzle(uuid: '365e898f-e2a3-4be0-bae8-f25bb241c51d'); // use your own uuid $inst = $pzl->resolve($pin); echo $inst . "\n"; # OUTPUT: 4497446061834.6175011677438780992.heBStfl9FLfqaqbC # NOTE: output is unique every run time. // ---------------- $my_pin = $pzl->assembly($inst); if ($my_pin === false) echo 'Bad PIN instruction setup' . "\n"; else echo $my_pin . "\n"; # OUTPUT: 1234
You can setup an instruction object manually like this:
$inst = (new \PinPuzzle\PinInstruction()) ->processor('4497446061834') ->input('6175011677438780992') ->key('heBStfl9FLfqaqbC');
License
PinPuzzle is released under the MIT license.