move encryption alg enum and common interface for builders