@staticmethod
    def get_object(mechanism, key):
        if mechanism == 'xor':
            return XOREncryption(key)
        if mechanism == 'PasswordProtected':
            return PasswordProtectedZipEncryption(key)
        else:
            raise ValueError("Unsupported encryption mechanism: %s" % mechanism)
dataset/ETHPy150Open CybOXProject/python-cybox/cybox/objects/artifact_object.py/Encryption.get_object/original