I want to encrypt some data using Yii::$app->security->encryptByKey and decrypt on javascript and vise versa.
example:
After user login to the system using Restful service. He will received a uniqe token. Every post / get request to API, the data must be encrypted. And server will response with encrypted data.
i already search on google and find this https://www.npmjs.com/package/hkdf, but this is for node js and i dont know how to implement in javascript (browser)
regards