i wanna convert that function to python
`class captha {
constructor() {
this.RECAPTCHA_ENCRYPT_SECRET = CryptoJS.MD5(“token”); // Chave secreta como WordArray
console.log(this.RECAPTCHA_ENCRYPT_SECRET)
}
encryptToken(z) {
// Convertendo a chave secreta e o token para o formato correto
return CryptoJS.TripleDES.encrypt(z, this.RECAPTCHA_ENCRYPT_SECRET, {
mode: CryptoJS.mode.ECB
}).toString();
}
}`
I tried
`
from Crypto.Hash import MD5
hash_obj = MD5.new(data=b”token”)
hash_bytes = hash_obj.digest()
words = [int.from_bytes(hash_bytes[i:i+4], byteorder=’little’, signed=True) for i in range(0, len(hash_bytes), 4)]
sigBytes = len(hash_bytes)
print(“Words:”, words)
print(“SigBytes:”, sigBytes)`
but dint worked