This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Hex binary to Base64 and vice versa  RSS feed

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am currently working on a project that requires conversion of Hex binary fingerprint to a Base64 encoded fingerprint and vice vesra.

e.g. Hex binary format: c88266d6581aab3e357342ae7c9c4c87a08a4a0f
Base 64 encoded: yIJm1lgaqz41c0KufJxMh6CKSg8=

Can anyone please help me with the code/ logic that would help me achieve my requirement?

Thanks in advance,
Anup
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want to actually write a Base64 Encoder/Decoder or are you happy to use an existing one ?
If the latter, then read this for a way to do it with the standard API. There are also 3rd party APIs available that are probably easier to use. Search this forum and/or Google. I've seen the one from SourceForge get mentioned quite often, but haven't actually used it myself.
 
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Jakarta Commons Codec library can perform base64-encoding/decoding.
 
Anup Bansal
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joanne / Ulf,

Thanks for your suggestions and inputs.
I used the Jakarta commons codec libarary to solve my problem.

Thanks & regards,
Anup
 
Evil is afoot. But this tiny ad is just an ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!