def bin2aid(binaid):
    """Convert an Application Identifier (AID) from binary to readable hexadecimal format"""
    aid = ''
    for i, x in enumerate(binaid):
        aid += '%02X' % x
        if i % 2:
            aid += ':'
    return aid.rstrip(':')