def modhex_encode(data):
    t_map = string.maketrans("0123456789abcdef", "cbdefghijklnrtuv")
    return data.translate(t_map)
Convert an ordinary hex string to modhex.
dataset/ETHPy150Open Yubico/python-pyhsm/pyhsm/yubikey.py/modhex_encode