gpt-3.5-turbo-0125· OpenAI
WildChat-4.8M (AI2)
i tried to console this console.log( CryptoJS.AES.decrypt(…
- User
i tried to console this console.log( CryptoJS.AES.decrypt( JSON.parse(localStorage.getItem('OMS-Auth')!), 'OMS-admin' ).toString(CryptoJS.enc.Utf8)) gives me malformed utf-8 but when i remove .toString(CryptoJS.enc.Utf8) worked well how stringify without giving this error
- Assistant
You can stringify the decrypted data without converting it to UTF-8 by using the
JSON.stringifymethod. Here's an example:console.log(JSON.stringify(CryptoJS.AES.decrypt( JSON.parse(localStorage.getItem('OMS-Auth')), 'OMS-admin' )));This will convert the decrypted data into a JSON string without causing any UTF-8 encoding errors.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.