i have a very long hex string in a byte array and I would like to format the output of that byte array such that it shows 0x??,0x??. The reason for this because I have a key that I am making and I don’t want to type out a 512bit key like that. Any native code that could help me do that would be appreciated.
basically, i have a rsa key generated in hex and was hoping to use that as a static byte array. But, i dont want to type it all out {0x??, 0x??} etc
thanks in advance! you guys are the best!
For each byte in the array:
cout << "0x" << hex << unsigned(theByte) << ",";wheretheByteis the value (hopefully anunsigned char) that you want to print.