Password Encryption and Decryption in Selenium | Selenium Python Forum
N
Nitika Sharma Posted on 09/11/2020
 

In exercise it is showing there

  • Password Encryption and Decryption in Selenium

But I could not found this in any of the lecture under Exercise.

Please help


J
Jaspreet Replied on 12/11/2020

Hey

In that module there are some changes being done that is why it is unavailable. You may try the given code,

import base64

data = input("Enter a string to encode : ")
print("String to be encoded : "+data)
print("")
encodedBytes = base64.b64encode(data.encode("utf-8"))
encodedStr = str(encodedBytes, "utf-8")
print("Encoded String : "+encodedStr)
decodedBytes = base64.b64decode(encodedStr)
decodedStr = str(decodedBytes, "utf-8")
print("Decoded String : "+decodedStr)


Related Posts