官网介绍
Encrypts or Decrypts a FlowFile using either symmetric encryption with a password and randomly generated salt, or asymmetric encryption using a public and secret key.
个人解读
配置详情
| Mode |
|
| Key Derivation Function |
|
| Encryption Algorithm |
选择加/解决密算法 |
| Allow insecure cryptographic modes |
在具有有限强度加密权限策略的jvm上,以覆盖默认行为,来防止不安全组合的加密算法和短密码. |
| Password | Sensitive Property: true 用于加密或解密数据的密码 |
| Raw Key (hexadecimal) | Sensitive Property: true 在密钥加密中,这是用十六进制编码的原始密钥 |
| Public Keyring File | 在PGP加密模式中,此密匙环包含接收者的公钥 |
| Public Key User Id | 在PGP加密模式中,接收方的此用户id |
| Private Keyring File | 在PGP解密模式中,此密匙环包含收件人的私钥 |
| Private Keyring Passphrase | Sensitive Property: true Supports Expression Language: true 在PGP解密模式中,这是私有密匙环口令 |
| PGP Symmetric Cipher |
使用PGP加密时,使用的是对称密码。 如果加密算法不是PGP或PGP-ASCII-ARMOR,则忽略此属性。 请注意,所提供的密码仅在加密阶段使用,而在解密阶段则从密文推断。 |
路由关系
| success | Any FlowFile that is successfully encrypted or decrypted will be routed to success |
| failure | Any FlowFile that cannot be encrypted or decrypted will be routed to failure |
备注
此组件的实例可能导致此系统资源的大量使用。多个实例或高并发性设置可能会导致性能下降。
总结
这个处理器的使用难度还是蛮大的,需要对于各种算法的使用有一定的了解,因为不同算法的什么情况下使用,是一个值得学习的地方。目前这个处理器用的比较浅,以后有实际用途可以多多深入研究。
实战记录
算法配置Encryption Algorithm:MD5系列和SHA系列 。Password一定要配置,并且密码字符串长度要大于10;Key Derivation Function需要配置NiFi Legacy KDF或者OpenSSL EVP_BytesToKey ;

总体流程

加密配置

解密配置




