split encrypt/decrypt methods into two pairs: actual encrypt/decrypt + json encode/decode