Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Base64Util with encode/decode methods and unit tests #6593

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

Open
TonGonzalez wants to merge 2 commits into TheAlgorithms:master
base: master
Choose a base branch
Loading
from TonGonzalez:feature/base64-util

Conversation

Copy link

@TonGonzalez TonGonzalez commented Oct 2, 2025

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Description

This PR introduces Base64Util, a utility class for Base64 encoding and decoding of strings.

Key points:

  • Added encode(String input) and decode(String base64) methods.
  • Implemented comprehensive unit tests in Base64UtilTest covering:
    • Normal strings
    • Empty strings
    • Null input
    • Invalid Base64 input
  • Followed the coding and testing conventions of the TheAlgorithms/Java repository.
  • Ensures safe and reliable Base64 conversion for various use cases.

If applicable, reference related issue: #<6585>

Copy link

codecov-commenter commented Oct 2, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.51%. Comparing base (d8ddb07) to head (ca86125).

Additional details and impacted files
@@ Coverage Diff @@
## master #6593 +/- ##
============================================
+ Coverage 75.50% 75.51% +0.01% 
- Complexity 5688 5692 +4 
============================================
 Files 694 695 +1 
 Lines 19570 19579 +9 
 Branches 3791 3791 
============================================
+ Hits 14776 14785 +9 
 Misses 4217 4217 
 Partials 577 577 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Arnav-NK commented Oct 3, 2025

did you solved the conflict i am getting the same can you help me with that please ?

Copy link
Author

Yes, I managed to solve it! I ended up using a website to do the formatting for me, I copied the code and pasted it into the website and then updated my code :) > did you solved the conflict i am getting the same can you help me with that please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@DenizAltunkapan DenizAltunkapan Awaiting requested review from DenizAltunkapan DenizAltunkapan is a code owner

@yanglbme yanglbme Awaiting requested review from yanglbme yanglbme is a code owner

@alxkm alxkm Awaiting requested review from alxkm alxkm is a code owner

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /