I have .hex file, how could I get a normal .pem file from it using python? I was trying binascii.unhexlify() but it breaks entire structure and doesn't give me what I need. Couldn't find any alternative. Thank you for any help.
I have .hex file, how could I get a normal .pem file from it using python? I was trying binascii.unhexlify() but it breaks entire structure and doesn't give me what I need. Couldn't find any alternative. Thank you for any help.
I don't have the reputation to add comments. Here is a relevant stackoverflow question that might help you with the conversion:
How to convert private key that is in hex format to private key in pem and/or der format?
You can do the conversion with:
import binascii
binascii.unhexlify(hex_data)
binascii.a2b_base64(binascii.unhexlify(hex_data))