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

Improved Base Encoding & Decoding #3312

Merged
merged 10 commits into from
Feb 19, 2024
Merged

Improved Base Encoding & Decoding #3312

merged 10 commits into from
Feb 19, 2024

Conversation

Nico8340
Copy link
Contributor

@Nico8340 Nico8340 commented Feb 13, 2024

Adds base encoding and decoding to the existing encodeString and decodeString functions, supports base64, base32, and url and hex variants asynchronously, deprecates the old base64Encode and base64Decode functions (The code remains)
Closes #3311 and #2002

Syntax:

encodeString("base64", "myString")
encodeString("base64", "myString", {variant = "URL"})
encodeString("base32", "myString")
encodeString("base32", "myString", {variant = "Hex"})

Syntax (asynchronous)

encodeString("base32", "myString", {variant = "Hex"},
	function(callbackString)
		iprint(callbackString)
	end
)

@Nico8340
Copy link
Contributor Author

If this Pull Request gets merged, I will update the wiki pages.

@Nico8340 Nico8340 mentioned this pull request Feb 13, 2024
@tederis tederis added the enhancement New feature or request label Feb 15, 2024
tederis
tederis previously approved these changes Feb 18, 2024
Copy link
Collaborator

@tederis tederis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@botder botder merged commit 30a83b0 into multitheftauto:master Feb 19, 2024
6 checks passed
@botder botder added this to the 1.6.1 milestone Feb 19, 2024
MTABot pushed a commit that referenced this pull request Feb 19, 2024
30a83b0 Add base32 and base64 to en/decodeString (PR #3312)
@Nico8340 Nico8340 deleted the base branch February 19, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved Base Encoding & Decoding
3 participants