Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase token size to 32 bytes #4486

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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 <eric_wade_brown@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_token script creates small token sizes
2 participants