Skip to content

Password Management

connectx.password

decrypt

Decrypt a given text or a URL containing an encrypted password.

If the input is a URL with a password, it only decrypts the password portion and reconstructs the full URL. Otherwise, it decrypts the full text.

Parameters:

Name Type Description Default
text

str, the string or URL to decrypt.

required

Returns:

Type Description

str, the decrypted text or reconstructed URL.

Raises:

Type Description
Exception

logs a warning and returns the original text if the decryption fails.

encrypt

Encrypt a given text using a predefined key.

Parameters:

Name Type Description Default
text

str, the plaintext string to encrypt.

required

Returns:

Type Description

str, the encrypted string.