def isJWE_compact(x): """ Test whether input is a JWE-compact object @rtype: boolean """ try: return isJWE_unserialized_single(deserialize_compact(x)) except: return False
def isJWP_compact(x): """ Test whether input is a JWP-compact object @rtype: boolean """ try: return isJWP_unserialized(deserialize_compact(x)) except: return False