exceptionfactory commented on code in PR #6821:
URL: https://github.com/apache/nifi/pull/6821#discussion_r1088184226


##########
nifi-nar-bundles/nifi-cipher-bundle/nifi-cipher-processors/src/main/java/org/apache/nifi/processors/cipher/compatibility/CompatibilityModeEncryptionScheme.java:
##########
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.processors.cipher.compatibility;
+
+import org.apache.nifi.processors.cipher.algorithm.SymmetricCipher;
+import org.apache.nifi.processors.cipher.algorithm.DigestAlgorithm;
+import org.apache.nifi.components.DescribedValue;
+
+import static org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.AES;
+import static org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.DES;
+import static 
org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.DESEDE;
+import static org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.RC2;
+import static org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.RC4;
+import static 
org.apache.nifi.processors.cipher.algorithm.SymmetricCipher.TWOFISH;
+
+/**
+ * Compatibility Mode Encryption Schemes supporting decryption using legacy 
algorithms such as PBES1 defined in RFC 8018 Section 6.1
+ */
+public enum CompatibilityModeEncryptionScheme implements DescribedValue {
+    PBE_WITH_MD5_AND_AES_CBC_128(
+            "PBEWITHMD5AND128BITAES-CBC-OPENSSL",
+            DigestAlgorithm.MD5,
+            AES,
+            "PKCS12 with MD5 digest and Advanced Encryption Standard in Cipher 
Block Chaining mode using 128 bit keys."
+    ),
+
+    PBE_WITH_MD5_AND_AES_CBC_192(
+            "PBEWITHMD5AND192BITAES-CBC-OPENSSL",
+            DigestAlgorithm.MD5,
+            AES,
+            "PKCS12 with MD5 digest and Advanced Encryption Standard in Cipher 
Block Chaining mode using 192 bit keys."
+    ),
+
+    PBE_WITH_MD5_AND_AES_CBC_256(
+            "PBEWITHMD5AND256BITAES-CBC-OPENSSL",
+            DigestAlgorithm.MD5,
+            AES,
+            "PKCS12 with MD5 digest and Advanced Encryption Standard in Cipher 
Block Chaining mode using 256 bit keys."
+    ),
+
+    PBE_WITH_MD5_AND_DES(
+            "PBEWITHMD5ANDDES",
+            DigestAlgorithm.MD5,
+            DES,
+            "PKCS5 Scheme 1 with MD5 digest and Data Encryption Standard 64 
bit keys. OID 1.2.840.113549.1.5.3"

Review Comment:
   No, `PKCS5` is correct. Some schemes follow the PKCS5 strategy for password 
handling, others follow PKCS12.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to