Skip to content

Conversation

ericwb
Copy link

@ericwb ericwb commented Apr 8, 2024

This fix bumps the token size from 16 to 32 bytes in order to match the default minimum entropy as recommended by Python docs.

Note, that there is also a comparison to a constant TOKEN_ΜΙΝ_LEN where one module assumed that length to be characters and another module (utils.py) assumes that length to be bytes. So this fix uses bytes as the meaning from now on.

Fixes #4481

Summary

Changes

Testing

Possible Regressions

Checklist

  • Read the contributions page.
  • Submitted the CLA form, if you are a first time contributor.
  • The introduced changes are covered by unit and/or integration tests.

Notes

This fix bumps the token size from 16 to 32 bytes in order
to match the default minimum entropy as recommended by Python
docs.

Note, that there is also a comparison to a constant TOKEN_ΜΙΝ_LEN
where one module assumed that length to be characters and another
module (utils.py) assumes that length to be bytes. So this fix
uses bytes as the meaning from now on.

Fixes canonical#4481

Signed-off-by: Eric Brown <[email protected]>
@ericwb ericwb force-pushed the increase_token_size branch from 10746d2 to db26427 Compare April 8, 2024 22:48
@github-actions github-actions bot added the Stale label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_token script creates small token sizes
2 participants