- 概述
- 加密
- 数据库
- Java
- Python
- 网页 API
开发者活动
UiPath.Cryptography.Activities.DecryptFile
描述
根据指定的密钥编码和算法解密文件。
项目兼容性
Windows - 旧版 | Windows | 跨平台
Windows、跨平台配置
- “文件” - 要解密的文件,存储为
IResource变量。选择加号
菜单以切换到“输入路径”输入。 - 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.
- Key - The key that you want to use to decrypt the specified file. This field supports only strings and
Stringvariables.
高级选项
选项
- Key Encoding - The encoding used to interpret the key specified in the Key property. This field supports only
Encodingvariables. The following options are available: System default, Unicode, Unicode (Big-Endian), Unicode (UTF-32), Unicode (UTF-32 Big-Endian), US-ASCII, Western European (ISO), and Unicode (UTF-8). - Output file name and location - The path where you want to save the decrypted file. This field supports only strings and
Stringvariables.备注:建议使用相对文件夹路径,以解决执行项目时 Windows 和 Linux 计算机之间不同的文件结构。相对路径采用
newFolder/newFileName.enc格式。如果目标文件夹尚不存在,则活动将创建该文件夹。 - Overwrite - If a file already exists, selecting
Onoverwrites it. If the toggle is set toOff, a new file is created. The default value isOff. - “出错时继续”- 指定在活动抛出错误时是否应继续自动化操作。该字段仅支持“布尔值”(
True和False)。默认值为False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。
根据输出路径以及文件已存在的情况,可能会出现以下结果:
| 输出文件的名称和位置 | 覆盖 | 输出结果 |
|---|---|---|
| 取消设置 | 关闭 | 具有原始文件名 + 后缀的文件“_Decrypted”。如果文件已存在,则会引发错误。 |
| 取消设置 | 启动 | 具有原始文件名 + 后缀的文件“_Decrypted”。如果文件已存在,则该文件将被覆盖。 |
| 集合 | 关闭 | 符合用户首选项的文件。如果文件已存在,则会引发错误。 |
| 集合 | 启动 | 符合用户首选项的文件。如果文件已存在,则该文件将被覆盖。 |
输出
- Decrypted File - Reference to the decrypted file retrieved by the activity for use in other activities.
Windows - 旧版配置
属性面板
常见
- “出错时继续”- 指定在活动抛出错误时是否应继续自动化操作。该字段仅支持“布尔值”(
True和False)。默认值为False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。备注:如果“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 位生成的密钥与“密钥输入”选项不同。
-
Decrypted Filename - The file name you want to use to save the decrypted file.
-
InputPath - The path to the file that you want to decrypt. This field supports only strings and
Stringvariables. -
Key - The key that you want to use to decrypt the specified file. This field supports only strings and
Stringvariables. -
Key Encoding - The encoding used to interpret the key specified in the Key property. This field supports only
Encodingvariables. -
Key Secure String - The secure string used to decrypt the input file.
-
Output file name and location - The path where you want to save the decrypted file. This field supports only strings and
Stringvariables. -
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.
其他
- “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。