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