- 概述
- 加密
- 数据库
- Java
- Python
- 网页 API
开发者活动
UiPath.Cryptography.Activities.DecryptText
描述
Decrypts a string using a symmetric algorithm and key, or using PGP with a private key. Returns the plaintext string. The encrypted input is Base64-encoded for symmetric algorithms and ASCII-armored for PGP.
项目兼容性
Windows - 旧版 | Windows | 跨平台
Windows、跨平台配置
- Algorithm - A drop-down menu which enables you to select the decryption 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). Select PGP to decrypt with a private key instead of a symmetric key. The algorithm must match the one used to encrypt the input.
- Text - The text that you want to decrypt. This field supports only strings and
Stringvariables. - Key - The key that you want to use to decrypt the specified text. Used by the symmetric algorithms only. This field supports only strings and
Stringvariables. 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 (aSecureString).
高级选项
选项
- Key Encoding - The encoding used to interpret the key specified in the Key property. Used by the symmetric algorithms only. 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.
- Text Encoding - The encoding used to convert the decrypted bytes back to text. Set this to match the encoding used by the tool that produced the ciphertext. Independent from Key Encoding - both offer the same full list of text encodings and default to Unicode (UTF-8). Used by the symmetric algorithms only.
- Continue On Error - Specifies if the automation should continue even if the activity throws an error. This field only supports Boolean values (
True,False). The default value isFalse. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set toTrue, the execution of the project continues regardless of any error.
Symmetric wire format and interoperability
These options apply to the symmetric algorithms only. They let you decrypt ciphertext produced by external tools such as openssl enc, Java, and Python. Each option must match what was used at encrypt time.
- Wire Format - The symmetric ciphertext layout to decrypt. Must match the format used at encrypt time. 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). The IV, when present, is read from the ciphertext stream prefix automatically. - UiPath (OWASP 2026) - The Classic layout with a stronger, OWASP-recommended KDF iteration count.
- Raw (caller-supplied key and IV) - A caller-supplied key, for third-party interoperability. Requires Key Bytes Format to be Hex or Base64.
- OpenSSL enc (Salted__ + PBKDF2-SHA256) - Decrypts
openssl enc-compatible input.
- UiPath (Classic) (default) - UiPath's byte-stable layout (
- 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.
- KDF Iterations - The PBKDF2 iteration count. Must match the value used at encrypt time, because it is not carried in the wire format.
0uses the format's OWASP-recommended default. Rejected for UiPath (Classic) and Raw (caller-supplied key and IV). - AES Key Size - The AES key size, in bits, used to encrypt the input. 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 producer used; it is not stored in the wire format.
PGP
These options apply when Algorithm is PGP.
- Private Key File Path - The path to your PGP private key file. Required when Algorithm is PGP.
- Passphrase - The passphrase that unlocks your private key. 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). - Verify Signature - When enabled, verifies the PGP signature of the decrypted data using the public key. This field only supports Boolean values (
True,False). The default value isFalse. - Public Key File Path - The path to the signer's PGP public key file. Required only when Verify Signature is enabled.
输出
- Decrypted Text - Reference to the decrypted text stored in a
Stringvariable for use in other activities.
Windows - 旧版配置
属性面板
常见
- Continue On Error - Specifies if the automation should continue even if the activity throws an error. This field only supports Boolean values (
True,False). The default value isFalse. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set toTrue, the execution of the project continues regardless of any error.备注:如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“
True”,则系统在执行项目时不会捕获任何错误。 - “显示名称”- 活动的显示名称。
输入
-
Algorithm - A drop-down menu which enables you to select the decryption 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.
备注:使用AES GCM算法时,解密输入必须以(连接的字节)格式提供:
Salt (8bytes) + IV (12 bytes) + encryptedData (variable bytes) + Tag (16 bytes)。该活动还使用以下参数:- PBKDF2 迭代计数为 10000
- 生成的密钥为 256 位(32 字节)
请注意,256 位生成的密钥与“密钥输入”选项不同。
-
编码- 用于解释在密钥属性中指定的输入文本和密钥的编码。此字段仅支持
Encoding变量。有关此变量类型的更多信息,请查看Microsoft 官方文档。 -
Key - The key that you want to use to decrypt the specified file. This field supports only strings and
Stringvariables. -
Key Secure String - The secure string used to decrypt the input string.
-
Text - The text that you want to decrypt. This field supports only strings and
Stringvariables.
其他
- “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。
输出
- Result - The decrypted text, stored in a
Stringvariable.