File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ Example:
5959 // Create Issuer
6060 $issuer = new \SimpleSAML\SAML2\XML\saml\Issuer('https://sp.example.edu');
6161
62- // Instantiate XML Random utils
63- $randomUtils = new \SimpleSAML\XML \Utils\Random();
62+ // Instantiate SAML2 Random utils
63+ $randomUtils = new \SimpleSAML\SAML2 \Utils\Random();
6464
6565 // Set up an AuthnRequest
6666 $request = new \SimpleSAML\SAML2\XML\samlp\AuthnRequest(
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace SimpleSAML \XML \Utils ;
6+
7+ use function bin2hex ;
8+ use function random_bytes ;
9+
10+ /**
11+ * @package simplesamlphp/saml2
12+ */
13+ class Random extends \SimpleSAML \XML \Utils \Random
14+ {
15+ /**
16+ * The fixed length of random identifiers.
17+ *
18+ * This results in the maximum of 160 bits entropy specified in paragraph 1.3.4 of the SAML 2.0 core specifications
19+ *
20+ * (41 - 1) / 2 = 20 → random_bytes(20) → 160 bits
21+ */
22+ public const int ID_LENGTH = 41 ;
23+ }
You can’t perform that action at this time.
0 commit comments