1 | <?php |
||
24 | final class TOTPSecretKeyUriGeneratorService implements StringGeneratorServiceInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var string part of the compound label. Company (or site) issuing the TOTP. Will be used as the issuer too. |
||
28 | * @see https://github.com/google/google-authenticator/wiki/Key-Uri-Format#issuer |
||
29 | */ |
||
30 | private $company; |
||
31 | /** |
||
32 | * @var string part of the compound label. Holder could be a user's secret owner. |
||
33 | */ |
||
34 | private $holder; |
||
35 | /** |
||
36 | * @var string an arbitrary key value encoded in Base32 according to RFC 3548 |
||
37 | * @see http://tools.ietf.org/html/rfc3548 |
||
38 | */ |
||
39 | private $secret; |
||
40 | |||
41 | /** |
||
42 | * GoogleQrCodeUrlService constructor. |
||
43 | * |
||
44 | * @param $company |
||
45 | * @param $holder |
||
46 | * @param $secret |
||
47 | */ |
||
48 | public function __construct($company, $holder, $secret) |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function run(): string |
||
68 | } |
||
69 |