I'm trying to generate an x5t parameter for a header to make a request to Azure using a certificate to authenticate. In the example given in the docs here: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-certificate-credentials, it's saying that the SHA-1 hash of 84E05C1D98BCE3A5421D225B140B36E86A3D5534 should give an x5t value of hOBcHZi846VCHSJbFAs26Go9VTQ=
When I try to convert this hash using the following, I find the x5t value to be ODRFMDVDMUQ5OEJDRTNBNTQyMUQyMjVCMTQwQjM2RTg2QTNENTUzNA==
What am I doing wrong in the conversion process?
import base64
x="84E05C1D98BCE3A5421D225B140B36E86A3D5534"
x5t = base64.b64encode(x.encode()).decode()
print(x)