This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to convert private key from text to hex value

HI Team,

We have generated the private key from "nrfutil" tool and we want to integrate to our code, how to extract from python generated file "private.key" file to hex value.

Eg:

         -----BEGIN EC PRIVATE KEY-----
MHcCAQEEIJX5obLZDyFEMZtW3BrfvreBI90xu9QmcfdkbKxfvMPhoAoGCCqGSM49
AwEHoUQDQgAEPKntlb897rDjpAp72pkz+Om4MPn7HvUFz9cBNGZzaLGyfM/VO6qf
6ZjW5BrSfsixYNc5D2qaTgJj7zg5ACDONQ==
-----END EC PRIVATE KEY-----

Regards,

Srinivas.V