This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/tooling-docs.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 0060d17  Commit build products
0060d17 is described below

commit 0060d174101302a5f2e46204f295791a5dc81aee
Author: Build Pelican (action) <[email protected]>
AuthorDate: Wed Nov 26 21:16:56 2025 +0000

    Commit build products
---
 output/draft-asf-token-standard.html | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/output/draft-asf-token-standard.html 
b/output/draft-asf-token-standard.html
index e035add..356b74c 100644
--- a/output/draft-asf-token-standard.html
+++ b/output/draft-asf-token-standard.html
@@ -155,22 +155,22 @@ True
 </code></pre>
 <p>Because the maximum value of a CRC-32, <code>0xFFFFFFFF</code>, is encoded 
by this specification as <code>4gfFC3</code>, no base62 encoded checksums 
beyond that value can be generated. One consequence is that the leading base62 
digit must be in the range <code>0-4</code>, and this is reflected in the 
regular expression. Further constraints to the regular expression would be 
possible, but the chosen constraint level balances accuracy with concision.</p>
 <h2>Sample generator code</h2>
-<pre><code>def asf_secret_token(component: str) -&gt; str:
-    import secrets
-    import zlib
-    lower = "abcdefghijklmnopqrstuvwxyz"
-    if len(component) not in (3, 4, 5, 6):
-        raise ValueError("Component must be between 3 and 6 letters")
-    if not (set(component) &lt;= set(lower)):
-        raise ValueError("Component must use lowercase letters only")
-    alphabet = "0123456789" + lower.upper() + lower
-    entropy = "".join(secrets.choice(alphabet) for _ in range(27))
-    n = zlib.crc32(entropy.encode("ascii"))
-    checksum = ""
-    for _ in range(6):
-        n, rem = divmod(n, 62)
-        checksum = alphabet[rem] + checksum
-    return f"asf_{component}_{entropy}{checksum}"
+<pre><code class="language-python">    def asf_secret_token(component: str) 
-&gt; str:
+        import secrets
+        import zlib
+        lower = "abcdefghijklmnopqrstuvwxyz"
+        if len(component) not in (3, 4, 5, 6):
+            raise ValueError("Component must be between 3 and 6 letters")
+        if not (set(component) &lt;= set(lower)):
+            raise ValueError("Component must use lowercase letters only")
+        alphabet = "0123456789" + lower.upper() + lower
+        entropy = "".join(secrets.choice(alphabet) for _ in range(27))
+        n = zlib.crc32(entropy.encode("ascii"))
+        checksum = ""
+        for _ in range(6):
+            n, rem = divmod(n, 62)
+            checksum = alphabet[rem] + checksum
+        return f"asf_{component}_{entropy}{checksum}"
 </code></pre>
 <h2>Sample generated tokens</h2>
 <p>These values must not be used in any application. The <code>sample</code> 
component will be registered by Security as the first known component, and can 
be used for documentation examples where an arbitrary component is suitable.</p>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to