Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8167845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:19:53+00:00 2026-06-06T20:19:53+00:00

I am working a software that uses Qt and has existing methods to encrypt/decrypt

  • 0

I am working a software that uses Qt and has existing methods to encrypt/decrypt checksum values in hex. Currently, I’ve encountered some checksum values that are in base 64. Instead of reinventing the wheel to do the same stuff for base64 checksum, I was wondering if there is a way to convert a base64 value to a hex value using Qt or KDE libs . This way I’d save myself from writing semi duplicate code to do the almost similar task.

Here is how it should work:

Input: VO2S9pgCq1lqgTFTKssVj6amn0npNdagtjI8ziDtiRQ=
Output: 54ed92f69802ab596a8131532acb158fa6a69f49e935d6a0b6323cce20ed8914

The input is contained in a QString.
Also in case there is no built in support in Qt/KDE can you suggest me a method in C++ ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:19:54+00:00Added an answer on June 6, 2026 at 8:19 pm

    This is what I tried right now:

     QString b64("VO2S9pgCq1lqgTFTKssVj6amn0npNdagtjI8ziDtiRQ=");
     QByteArray ba = QByteArray::fromBase64(b64.toAscii());
    
     QString res(ba.toHex());
    
     qDebug() << res;
    

    Probably there’s a more correct way to do it, but I’m too sleepy right now, sorry.

    As a function:

     /// untested
     QString base64ToHex(const QString& b64){
         QByteArray ba = QByteArray::fromBase64(b64.toAscii());
         QString res(ba.toHex());
    
         return res;      
     }
    

    or simply..

     QString base64ToHex(const QString& b64){
         return QString(QByteArray::fromBase64(b64.toAscii()).toHex());
     }
    

    Edit 1: with Qt5 you should use QString::toLatin1() instead of QString::toAscii().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a plugin for Avogadro (chemistry software) that uses pyqt. I've some
I am working on some software that uses an OleDB to open a .xls
I'm working on some software to manage a device that communicates with a remote
I am working on a software development project that uses code written primarily in
I'm working on a software that uses delphi and postgres 9.0, the original developer
I am working on a Wordpress site that uses an e-commerce engine for some
I am currently working with an inherited piece of code that uses a very
I'm working on a piece of software that would work well with an iTunes
A software application that I'm working on needs to be able to assign tasks
We have situation where say we have four engineers that are working on software

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.