encrypt/decrypt data to store on cookie with memorization for Nodejs