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 8637959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:36:19+00:00 2026-06-12T10:36:19+00:00

am using QCryptographicHash to hash a pass and save it in an XML file,

  • 0

am using QCryptographicHash to hash a pass and save it in an XML file, my problem is when I use QDomDocument to read and update other elements in my xml file the element password changes and I don’t know how.

any help please !!!

here is my xml file with correct data

<?xml version='1.0' encoding='UTF-8'?>
<Folders>
 <folder DriveL="" Mounted="false" PassW="!Å?L,-;©Óñn?Ãs?N·¦ø" Path="C:\MyProjects\DiskCrypt\testFolder\TestFolder"/>

when I need to update the drive letter I use QDomDocument to read data and modify it, every thing goes all right. My application encrypt my xml file if the user exit ant decrypt it once it rerun, but after the decryption I get this:

<?xml version='1.0' encoding='UTF-8'?>
<Folders>
 <folder DriveL="" Mounted="false" PassW="!??L,-;???n??s?N???" Path="C:\MyProjects\DiskCrypt\testFolder\TestFolder"/>
</Folders>

so PassW should be "!Å?L,-;©Óñn?Ãs?N·¦ø" but after encryption it is "!??L,-;???n??s?N???", I use simple algorithm for encrption and decryption (AES 128).

  • 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-12T10:36:20+00:00Added an answer on June 12, 2026 at 10:36 am

    To avoid text encoding issues and also make your XML file human-readable, you should never put binary data directly into your XML document. Use base64 or hexadecimal encoding instead.

    Since QCryptographicHash generates a hash in binary form, you have to call .toHex() on the byte array you got from it. (Base64 would also be OK and even smaller, but hexadecimal encoding of hashes is “the default” way to make them human-readable.)

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

Sidebar

Related Questions

Using Java,I have to fetch multiple sets of values from an XML file to
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using the Qt library, is there a way to automatically update a QDateTimeEdit using
Using mercurial, I've run into an odd problem where a line from one committer
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using jQuery, one can easily find out whether a particular element is visible using
Using the HTML5 File API I can get the Binary String representation of a
Using the new mvc4 now gives us access to use facebook oauth otb. I
Using PyObjC , you can use Python to write Cocoa applications for OS X.

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.