what you’re saying sounds like you don’t understand what hexadecimal is, what bits and bytes are, what a file is, what a CRC is, or why you’re even trying to do any of that.
this has nothing to do with OpenCV. please find an appropriate forum… but before you do that, you should learn about these things. don’t ask questions for which you can trivially get answers from existing materials (books etc)