UiPath Documentation
activities
latest
false
Actividades de desarrollador
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Cifrar archivo

UiPath.Cryptography.Activities.EncryptFile

Descripción

Encrypts a file using a symmetric algorithm and key, or using PGP with a recipient's public key. The result is written to a new file.

Compatibilidad de proyectos

Windows - Heredado | Windows | Multiplataforma

Windows, configuración multiplataforma

  • Archivo : el archivo que se va a cifrar, almacenado como una variable IResource . Selecciona el Más Imagen de documentos para cambiar a la entrada Ruta de entrada .
  • Algorithm - A drop-down menu which enables you to select the encryption algorithm you want to use. The following options are available: AES GCM, ChaCha20-Poly1305 (Non-FIPS), PGP - Pretty Good Privacy (Non-FIPS), AES (Deprecated), DES (Deprecated), RC2 (Non-FIPS) (Deprecated), Rijndael (Non-FIPS) (Deprecated), and TripleDES (Deprecated). AES GCM and ChaCha20-Poly1305 (Non-FIPS) are authenticated (AEAD) algorithms recommended for new workflows. Select PGP to encrypt with a recipient's public key instead of a symmetric key.
  • Key - The key that you want to use to encrypt the file. Used by the symmetric algorithms only. This field supports only strings and String variables. To enter the key as a secure string instead of plain text, select the field's input menu and choose Toggle to Secure input - this uses the Key Secure String property (a SecureString).

Opciones avanzadas

Opciones
  • Key Encoding - The encoding used to interpret the key specified in the Key property. The dropdown lists all text encodings (code pages) available on the machine, with the most common ones shown first: System default, Unicode (UTF-8) (default), Unicode, Unicode (Big-Endian), Unicode (UTF-32), Unicode (UTF-32 Big-Endian), US-ASCII, and Western European (ISO). Additional regional and legacy code pages follow in the list.
  • Output file name and location - The path where you want to save the encrypted file. This field supports only strings and String variables.
    Nota:

    Se recomiendan las rutas de carpeta relativas para tener en cuenta las diferentes estructuras de archivos entre máquinas Windows y Linux al ejecutar un proyecto. Una ruta relativa sigue el formato newFolder/newFileName.enc. La actividad crea la carpeta de destino si aún no existe.

  • Overwrite - If a file already exists, selecting On overwrites it. If the toggle is set to Off, a new file is created. The default value is Off.
  • ContinuarEnCasoDeError: especifica si la automatización debe continuar incluso cuando la actividad arroja un error. Este campo solo admite valores booleans (True, False). El valor predeterminado es False. Por lo tanto, si el campo está vacío y se produce un error, se detiene la ejecución del proyecto. Si el valor es True, la ejecución del proyecto continúa independientemente de cualquier error.
Symmetric wire format and interoperability

These options apply to the symmetric algorithms only. They let you produce ciphertext that interoperates with external tools such as openssl enc, Java, and Python. Existing workflows that do not set Wire format keep producing the default Classic output, which is unchanged.

  • Wire Format - The symmetric ciphertext layout. The following options are available:
    • UiPath (Classic) (default) - UiPath's byte-stable layout (salt(8) + IV + ciphertext [+ tag], PBKDF2-HMAC-SHA1 at 10,000 iterations). Produces the same output as previous versions.
    • UiPath (OWASP 2026) - The Classic layout with a stronger, OWASP-recommended KDF iteration count.
    • Raw (caller-supplied key and IV) - A caller-supplied key and IV, for third-party interoperability. Requires Key Bytes Format to be Hex or Base64.
    • OpenSSL enc (Salted__ + PBKDF2-SHA256) - Produces openssl enc-compatible output.
  • Key Bytes Format - How the Key string is interpreted. The following options are available: Hex and Base64. Required when Wire Format is Raw (caller-supplied key and IV); otherwise the key is treated as a password.
  • IV - The initialization vector, used when Wire Format is Raw (caller-supplied key and IV). Interpreted according to Key Bytes Format. Optional - leave it empty to let the cipher generate one. Rejected for all other formats.
  • KDF Iterations - The PBKDF2 iteration count. 0 uses the format's OWASP-recommended default (1,300,000 for UiPath (OWASP 2026), 600,000 for OpenSSL enc). Rejected for UiPath (Classic) and Raw (caller-supplied key and IV).
  • AES Key Size - The AES key size, in bits. The following options are available: 128-bit, 192-bit, and 256-bit (default). Applies only when Algorithm is AES and Wire Format is OpenSSL enc (Salted__ + PBKDF2-SHA256). Must match the key size the peer uses. It is not stored in the wire format, so the encrypt and decrypt sides must use matching values.
PGP

These options apply when Algorithm is PGP.

  • Public Key File Path - The path to the recipient's PGP public key file. Required when Algorithm is PGP.
  • Private Key File Path - The path to your PGP private key file. Required only when Sign Data is enabled.
  • Passphrase - The passphrase that unlocks your private key when signing. To provide it as a secure string instead of plain text, select the field's input menu and switch to the Passphrase (Secure) input (a SecureString).
  • Sign Data - When enabled, signs the encrypted data using your private key. This field only supports Boolean values (True, False). The default value is False.

Dependiendo de la ruta de salida y si el archivo ya existe, pueden producirse los siguientes resultados:

Nombre y ubicación del archivo de salidaSobrescribirResultado de salida
DesarmadoOffUn archivo con el nombre de archivo original + el sufijo "_Encrypted". Si el archivo ya existe, se produce un error.
DesarmadoActivadoUn archivo con el nombre de archivo original + el sufijo "_Encrypted". Si el archivo ya existe, se sobrescribirá.
ESTABLECEROffUn archivo según la preferencia del usuario. Si el archivo ya existe, se produce un error.
ESTABLECERActivadoUn archivo según la preferencia del usuario. Si el archivo ya existe, se sobrescribirá.
Salida
  • Encrypted File - Reference to the encrypted file retrieved by the activity for use in other activities.

Windows - Configuración heredada

Panel de propiedades

Común
  • ContinuarEnCasoDeError: especifica si la automatización debe continuar incluso cuando la actividad arroja un error. Este campo solo admite valores booleans (True, False). El valor predeterminado es False. Por lo tanto, si el campo está vacío y se produce un error, se detiene la ejecución del proyecto. Si el valor es True, la ejecución del proyecto continúa independientemente de cualquier error.
    Nota:

    Si se incluye esta actividad en Intentar capturar y el valor de la propiedad ContinuarEnCasoDeError es True, no se detectará error cuando el proyecto se ejecute.

  • Nombre para mostrar: el nombre para mostrar de la actividad.
Entrada
  • Algorithm - A drop-down menu which enables you to select the encryption algorithm you want to use. The following options are available: AES (Deprecated), AES GCM, DES (Deprecated), RC2 (Non-FIPS) (Deprecated), Rijndael (Non-FIPS) (Deprecated), and TripleDES.

    Nota:

    Al utilizar el algoritmo AES GCM , la entrada de descifrado debe proporcionarse en el formato de (bytes concatenados): Salt (8bytes) + IV (12 bytes) + encryptedData (variable bytes) + Tag (16 bytes). La actividad también utiliza los siguientes parámetros:

    • El recuento de iteraciones de pbkdf2 es 10000
    • La clave generada es de 256 bits (32 bytes)

    Ten en cuenta que la clave generada de 256 bits no es la misma que la opción de entrada Clave .

  • Encrypted Filename - The file name you want to use to save the encrypted file.

  • Input Path - The path to the file that you want to encrypt. This field supports only strings and String variables.

  • Key - The key that you want to use to encrypt the specified file. This field supports only strings and String variables.

  • Key Encoding - The encoding used to interpret the key specified in the Key property. This field supports only Encoding variables.

  • Key Secure String - The secure string used to encrypt the input file.

  • Output file name and location - The path where you want to save the encrypted file. This field supports only strings and String variables.

  • Overwrite - If a file already exists at the path specified in the OutputPath field, selecting this check box overwrites it. If unchecked, a new file is created. By default, this check box is cleared.

Otros
  • Privado : si se selecciona, los valores de variables y argumentos ya no se registran en el nivel Detallado.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado