Skip to content

Conversation

@Sl4y3r-07
Copy link

Problem description

Ability to paste Base64 with autodetection of base64 when pasting or under the paste as dropdown.

Implementation description

I have added an option Paste all as decoded base64 string under the Paste as option.
I have modified the function pasteBytes() in plugins/builtin/source/content/views/view_hex_editor.cpp and added two functions isValidBase64() and decodeBase64().
It checks if the copied string is empty or its length a multiple of 4 (because a valid base64 string is multiple of 4 or padded with = to satisfy the condition).
Then it decodeBase64 function is called and decoded output is pasted.
For eg, aGVsbG8gd29ybGQ= -> this string is present in my clipboard, I am attaching the screenshot.

Screenshots

image image

@Sl4y3r-07
Copy link
Author

@WerWolv Can you please look into it and let me know if further changes are required?

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.

1 participant