Python base64.b32hexencode not creating expected result – Ubuntu
I expect the code to return TPLIG0 as the base32 hex-extended value for 1 billion (1.000.000.000). Instead I get 7EDCK00= . Here is my code: import base64 num = 1000000000 needed_bytes = num.to_bytes((num.bit_length() + 7) // 8, byteorder='big') result =…