Decryption Action

Hi Everyone,
I’m trying to decrypte a string encrypted in Base64 using this :

${encryptedData}= Evaluate base64.b64decode(${DataField[0]}[1]).decode(‘utf-8’) modules=base64

${DataField[0]}[1] its a variable that i get from database.
this is the error that i got :

failed: Variable ‘$WW’ not found.

Can any one help in this topic plz.

Thanks in advance

See the construction of the variable. You are passing $WW to b64decode and not the content as you expected.

this is all the script, i have no variable like : $WW

${DataField} = DatabaseLibrary.Query SELECT * FROM t_test WHERE DP=‘ELD02’
${encryptedData}= Evaluate base64.b64decode(${DataField[0]}[1]).decode(‘utf-8’) modules=base64

Do a Log Many ${DataField[0]} after the query to see its value. I think you are getting the WW from the [1] element.

Log of this variable ${DataField[0]} return for me all informations of the line
ex:

0: wwww | 1: xxxx | 2: yyyy | 3: zzzz

but ${DataField[0]}[1] it return for me just the data that i want : xxxx

So you want the index inside the curly braces:
${DataField[0][1]}

exactly when i do it o get the below error :

failed: Variable ‘$WW’ not found.

That was not in your original post.