[ 
https://issues.apache.org/jira/browse/COMPRESS-633?focusedWorklogId=832369&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-832369
 ]

ASF GitHub Bot logged work on COMPRESS-633:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Dec/22 14:48
            Start Date: 09/Dec/22 14:48
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on code in PR #332:
URL: https://github.com/apache/commons-compress/pull/332#discussion_r1044525053


##########
src/main/java/org/apache/commons/compress/archivers/sevenz/AES256Options.java:
##########
@@ -0,0 +1,100 @@
+/*
+ *  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.commons.compress.archivers.sevenz;
+
+import java.security.GeneralSecurityException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * Options for {@link SevenZMethod#AES256SHA256} encoder
+ * 
+ * @since 1.23
+ * @see AES256SHA256Decoder
+ */
+public class AES256Options {
+
+    private final byte[] salt;
+    private final byte[] iv;
+    private final int numCyclesPower;
+    private final Cipher cipher;
+
+    /**

Review Comment:
   Please complete the Javadoc comments. You need a starting sentence.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 832369)
    Time Spent: 2h  (was: 1h 50m)

> Adding support for SevenZ password encryption
> ---------------------------------------------
>
>                 Key: COMPRESS-633
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-633
>             Project: Commons Compress
>          Issue Type: Improvement
>          Components: Compressors
>    Affects Versions: 1.22
>            Reporter: Daniel Santos
>            Priority: Major
>              Labels: contributing, features
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> 👉🏼 The purpose is to provide password based encryption for 7z compression in 
> the same way of decryption already supported, so go forward of [one know 
> limitation|https://commons.apache.org/proper/commons-compress/limitations.html]
> ☝️In this way, I would like to submit my contribution based on the existing 
> implementation of decryption and the [C++ implementation of 7z 
> |https://github.com/kornelski/7z/blob/main/CPP/7zip/Crypto/7zAes.cpp]
> ✅ I added one unit test
>  
> I prepared a [Pull Request on 
> GitHub|https://github.com/apache/commons-compress/pull/332]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to