encrypt swap