@classmethod
def from_string(cls, txt):
    """Convert a string to a encryption type constant"""
    if txt is None:
        return None
    t = txt.upper()
    if t in ('AES-256', 'AES_256'):
        return cls.CBC_AES_256_HMAC_SHA_256
    return getattr(cls, t, None)
