Skip to content

Commit e08b0a5

Browse files
committed
Merge branch 'master' into nico-sensitive-attr
* master: add CI4-auth link in README. fix #107 (#123) remove insecure rng providers and remove polyfill for hash_equals (#122) delete files specific to code editors (#120) Exclude useless files from dist archive #103
2 parents 83c7449 + ecef270 commit e08b0a5

16 files changed

+25
-385
lines changed

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/.github/ export-ignore
2+
/demo/ export-ignore
3+
/docs/ export-ignore
4+
/tests/ export-ignore
5+
/testsDependency/ export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.php-cs-fixer.dist.php export-ignore
9+
/logo.png export-ignore
10+
/multifactorauthforeveryone.png export-ignore
11+
/phpstan.neon export-ignore
12+
/phpunit.xml export-ignore

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ You can make use of the included [Endroid](https://robthree.github.io/TwoFactorA
1919

2020
* Requires PHP version >=8.2
2121
* [cURL](http://php.net/manual/en/book.curl.php) when using the provided `QRServerProvider` (default), `ImageChartsQRCodeProvider` or `QRicketProvider` but you can also provide your own QR-code provider.
22-
* [random_bytes()](http://php.net/manual/en/function.random-bytes.php), [OpenSSL](http://php.net/manual/en/book.openssl.php) or [Hash](http://php.net/manual/en/book.hash.php) depending on which built-in RNG you use (TwoFactorAuth will try to 'autodetect' and use the best available); however: feel free to provide your own (CS)RNG.
2322

2423
Optionally, you may need:
2524

@@ -42,6 +41,7 @@ If you need more in-depth information about the configuration available then you
4241
## Integrations
4342

4443
- [CakePHP 3](https://github.com/andrej-griniuk/cakephp-two-factor-auth)
44+
- [CI4-Auth: a user, group, role and permission management library for Codeigniter 4](https://github.com/glewe/ci4-auth)
4545

4646
## License
4747

TwoFactorAuth.phpproj

Lines changed: 0 additions & 69 deletions
This file was deleted.

TwoFactorAuth.sln

Lines changed: 0 additions & 22 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,5 @@
6161
"test": [
6262
"XDEBUG_MODE=coverage phpunit"
6363
]
64-
},
65-
"archive": {
66-
"exclude": [
67-
"/.github/",
68-
"/demo/",
69-
"/docs/",
70-
"/tests/",
71-
"/testsDependency/",
72-
"/.gitignore",
73-
"/logo.png",
74-
"/multifactorauthforeveryone.png",
75-
"/phpunit.xml",
76-
"/TwoFactorAuth.phpproj",
77-
"/TwoFactorAuth.sln"
78-
]
7964
}
8065
}

docs/optional-configuration.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@ Argument | Default value | Use
2121

2222
### RNG providers
2323

24-
This library also comes with some [Random Number Generator (RNG)](https://en.wikipedia.org/wiki/Random_number_generation) providers. The RNG provider generates a number of random bytes and returns these bytes as a string. These values are then used to create the secret. By default (no RNG provider specified) TwoFactorAuth will try to determine the best available RNG provider to use in this order.
25-
26-
1. [CSRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/CSRNGProvider.php) for PHP7+
27-
2. [OpenSSLRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/OpenSSLRNGProvider.php) where openssl is available
28-
3. [HashRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/HashRNGProvider.php) **non-cryptographically secure** fallback
29-
30-
Each of these RNG providers have some constructor arguments that allow you to tweak some of the settings to use when creating the random bytes.
31-
32-
You can also implement your own by implementing the [`IRNGProvider` interface](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/IRNGProvider.php).
24+
Should you feel the need to use a CSPRNG different than `random_bytes()`, you can use the `rngprovider` argument of the constructor to provide an object implementing the [`IRNGProvider`](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/IRNGProvider.php) interface.
3325

3426
### Time providers
3527

lib/Providers/Rng/CSRNGProvider.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,4 @@ public function getRandomBytes(int $bytecount): string
1313
{
1414
return random_bytes($bytecount); // PHP7+
1515
}
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public function isCryptographicallySecure(): bool
21-
{
22-
return true;
23-
}
2416
}

lib/Providers/Rng/HashRNGProvider.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

lib/Providers/Rng/IRNGProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
interface IRNGProvider
88
{
99
public function getRandomBytes(int $bytecount): string;
10-
11-
public function isCryptographicallySecure(): bool;
1210
}

lib/Providers/Rng/OpenSSLRNGProvider.php

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)