migrate encrypt/decrypt to another method