Search code examples
xmlwindowschecksummd5sumfciv

Windows FCIV md5chucksum utility doesn't have the right md5sum when export to xml


Here is the command I use (on a windows box):

$ FCIV -md5 C:\Files -xml C:\data\config.xml -r

It creates the xml as expected but the md5 checksums seem to be wrong. If I run the following command:

$ FCIV -md5 file.txt

I get what I believe to be the correct checksum (matches what linux box gives me). Either way I don't understand why outputting to config.xml would have a different checksum of the file.

If I output the second command to xml the md5 checksum seems to be wrong (same sum as the first command).

Is there a parameter I need that I can't find (I've googled, man page..)? Or am I misunderstanding how something works here? As always, appreciate the help! :)


Solution

  • So the problem was that FCIV encoded the hash in Base 64 when saving to xml. Here is the link that answered my question: http://hansbobby.logdown.com/posts/200764-decode-base64-binary-sha1-hash

    Basically used the command: echo 'FCC9sNSHaSfhqpYS3JwEgKzeL3I=' | openssl enc -base64 -d | xxd -p. Had to yum install vim-common.

    The following link was also helpful, explaining the problem: https://social.technet.microsoft.com/Forums/windowsserver/en-US/a828e6a5-c142-4b9a-8936-260a9da4a9c4/sha1-hashes-and-base64-encoding-wierdness