Updated encryption to increment nonce in memory, not DB

TODO: Need to add support to increment the nonce in the DB.