Send and Receive PHP data in encrypted form

Just starting out? Need help? Post your questions and find answers here.
skinkairewalker
Posts: 120
Joined: Tue Jun 14, 2016 7:17 pm

Send and Receive PHP data in encrypted form

Post by skinkairewalker »

some way to easily communicate from SpiderBasic with PHP in encrypted form ?

I did an example using cryptoJS with AES, but it seems to be a pain to communicate with PHP using AES, is there a better way to do this?

Code: Select all

  Procedure Main(URL$, Success)
    Debug "Script URL: " + URL$
    Debug "Loading status: " + Success
    
    hash.s = ""
    encrypted.s = ""
    decryted.s = ""
    
    !v_encrypted = CryptoJS.AES.encrypt("123 ", "475696");
    !v_decryted = CryptoJS.AES.decrypt(v_encrypted, "475696");
    !v_decryted = v_decryted.toString(CryptoJS.enc.Utf8);
    
    
    Debug "Criptografado = "+encrypted
    Debug "Decifrado = "+decryted
    Debug "-=-----------------"

  EndProcedure

  LoadScript("https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js", @Main())