Skip to content

[Feature] Add Base64 paste decoding (Fixes #2317)#2477

Open
Sl4y3r-07 wants to merge 1 commit into
WerWolv:masterfrom
Sl4y3r-07:feature/base64
Open

[Feature] Add Base64 paste decoding (Fixes #2317)#2477
Sl4y3r-07 wants to merge 1 commit into
WerWolv:masterfrom
Sl4y3r-07:feature/base64

Conversation

@Sl4y3r-07
Copy link
Copy Markdown

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
Copy Markdown
Author

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

@WerWolv
Copy link
Copy Markdown
Owner

WerWolv commented Nov 29, 2025

Looks good to me. I'll try it out locally later and merge if everything works

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.

2 participants