Is it necessary for front-end H5 to use AES encryption before transmitting data?

problem description

since all the code in the front end H5 can be seen in the browser, the AES encrypted key will be exposed, so is it necessary to encrypt ?

the environmental background of the problem

the front end H5 uses AES encryption to transmit data to the background, and the background gets the data through decryption.

related codes

// AES
function aesEncrypt(value){
  var key = "abcdefg"
  var encryptedData = CryptoJS.AES.encrypt(CryptoJS.enc.Utf8.parse(value), CryptoJS.enc.Utf8.parse(key), {
    mode: CryptoJS.mode.ECB,
    padding: CryptoJS.pad.Pkcs7
  });
  return encryptedData.ciphertext.toString();
}
Jun.11,2021

generally does not encrypt data, but gives it to https (after all, there is nothing to stop others from seeing the data generated by their own operations), but only encrypts cookie , etc., just to increase the difficulty of cracking.


Front-end encryption is not meaningful, because your code has exposed


encryption is really not meaningful


Front-end encryption can only be used to increase the difficulty of cracking.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea5277-1d38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea5277-1d38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?