Move encryption type to constructor