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

Add safe mode (base24) #20

Merged
merged 4 commits into from Jan 31, 2024
Merged

Add safe mode (base24) #20

merged 4 commits into from Jan 31, 2024

Conversation

turiyadev
Copy link
Collaborator

This includes a major breaking change, as it modifies how KeymaskEncoder gets seeded. This change was not 100% necessary, however it makes the initialization of the Base24 encoding alphabet slightly more efficient.

Hostnames and subdomains are case-insensitive, so standard keymasks cannot be used there. This PR adds a new mode ("safe mode") that avoids the use of uppercase characters, while otherwise staying true to the design principles of the standard mode.

Safe mode is triggered with a boolean switch on the constructor options. API otherwise remains the same, bearing in mind that the block length is 14 characters in safe mode, rather than the standard 12.

@turiyadev turiyadev merged commit b474b21 into master Jan 31, 2024
3 checks passed
@turiyadev turiyadev deleted the safe-mode branch January 31, 2024 00:01
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.

None yet

1 participant