coerce numeric list inst sha-looking bytearray

def encode_to_sha(msg):
    """coerce numeric list inst sha-looking bytearray"""
    if isinstance(msg, str):
        msg = msg.encode('utf-8')
    return (codecs.encode(msg, "hex_codec") + (b'00' * 32))[:64]