Initial Commit
This commit is contained in:
parent
93a0b9be02
commit
6e599b2c0c
99 changed files with 10836 additions and 4 deletions
15
tests/totp_test.php
Normal file
15
tests/totp_test.php
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
require 'ncc';
|
||||
import('net.nosial.federationlib');
|
||||
|
||||
$secret_file = __DIR__ . DIRECTORY_SEPARATOR . 'secret.txt';
|
||||
if(!file_exists($secret_file))
|
||||
{
|
||||
file_put_contents($secret_file, \FederationLib\Classes\Security::generateSecret());
|
||||
}
|
||||
|
||||
$secret = file_get_contents($secret_file);
|
||||
$code = \FederationLib\Classes\Security::generateCode($secret);
|
||||
print(sprintf("Code: %s\n", $code));
|
||||
exit(0);
|
Loading…
Add table
Add a link
Reference in a new issue