Make cipher object loading more generic