Skip to content

Add encryption algorithm and key derivation algorithm to the 7z format.#505

Open
fzxx wants to merge 2 commits into
mcmilk:masterfrom
fzxx:master
Open

Add encryption algorithm and key derivation algorithm to the 7z format.#505
fzxx wants to merge 2 commits into
mcmilk:masterfrom
fzxx:master

Merge branch 'master' into master

a0c3368
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 29, 2026 in 4m 39s

Quality Gate failed

Failed conditions
7.0% Duplication on New Code (required ≤ 3%)
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 522 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not use the constructor's initializer list for data member "_xcBlockPos". Use the in-class initializer instead.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1CJAa7A7SGbzWs&open=AZ6_sY1CJAa7A7SGbzWs&pullRequest=505

Check warning on line 12 in CPP/7zip/Crypto/Pbkdf2HmacSha512.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Concatenate this namespace with the nested one.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYxYJAa7A7SGbzUV&open=AZ6_sYxYJAa7A7SGbzUV&pullRequest=505

Check warning on line 11 in CPP/7zip/Crypto/XChaCha20Register.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Concatenate this namespace with the nested one.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYygJAa7A7SGbzVC&open=AZ6_sYygJAa7A7SGbzVC&pullRequest=505

Check warning on line 65 in CPP/7zip/Crypto/XChaCha20.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYxzJAa7A7SGbzUy&open=AZ6_sYxzJAa7A7SGbzUy&pullRequest=505

Check warning on line 995 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this raw for-loop to a range for-loop or an "std::ranges::for_each".

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1CJAa7A7SGbzXQ&open=AZ6_sY1CJAa7A7SGbzXQ&pullRequest=505

Check warning on line 232 in CPP/7zip/Crypto/ChaCha20Simd.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Pass large object "val" by reference to const.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY0EJAa7A7SGbzWX&open=AZ6_sY0EJAa7A7SGbzWX&pullRequest=505

Check warning on line 1060 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1CJAa7A7SGbzXR&open=AZ6_sY1CJAa7A7SGbzXR&pullRequest=505

Check warning on line 911 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::byte" for byte-oriented data manipulation.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1CJAa7A7SGbzXN&open=AZ6_sY1CJAa7A7SGbzXN&pullRequest=505

Check warning on line 15 in CPP/7zip/Crypto/XChaCha20.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Concatenate this namespace with the nested one.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYxzJAa7A7SGbzUt&open=AZ6_sYxzJAa7A7SGbzUt&pullRequest=505

Check warning on line 521 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not use the constructor's initializer list for data member "_aesKeys". Use the in-class initializer instead.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ7thB5C4ZKJmrimkJPi&open=AZ7thB5C4ZKJmrimkJPi&pullRequest=505

Check warning on line 474 in CPP/7zip/Crypto/XChaCha20Poly1305.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Check if the usage of the type "volatile unsigned char" is really appropriate here (for inter-thread synchronization, atomic types are more suited).

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1uJAa7A7SGbzYJ&open=AZ6_sY1uJAa7A7SGbzYJ&pullRequest=505

Check failure on line 256 in CPP/7zip/Crypto/XChaCha20.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYzyJAa7A7SGbzWH&open=AZ6_sYzyJAa7A7SGbzWH&pullRequest=505

Check failure on line 33 in CPP/7zip/Crypto/Cascade.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Member variables should not be "protected".

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYy7JAa7A7SGbzVM&open=AZ6_sYy7JAa7A7SGbzVM&pullRequest=505

Check failure on line 29 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the "nullptr" literal.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ7thB5C4ZKJmrimkJPn&open=AZ7thB5C4ZKJmrimkJPn&pullRequest=505

Check warning on line 178 in CPP/7zip/Crypto/Cascade.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYy7JAa7A7SGbzVj&open=AZ6_sYy7JAa7A7SGbzVj&pullRequest=505

Check failure on line 81 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Access (via dereference) of the field '_stateBuf' at an overflowing index, while it holds only 16 'unsigned char' elements

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ7thB5C4ZKJmrimkJPo&open=AZ7thB5C4ZKJmrimkJPo&pullRequest=505

Check warning on line 183 in CPP/7zip/Crypto/Cascade.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYy7JAa7A7SGbzVl&open=AZ6_sYy7JAa7A7SGbzVl&pullRequest=505

Check warning on line 105 in CPP/7zip/Crypto/ChaCha20Simd.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Modify the macro definition so that it needs to be followed by a semicolon, or remove this empty statement.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY0EJAa7A7SGbzWQ&open=AZ6_sY0EJAa7A7SGbzWQ&pullRequest=505

Check warning on line 88 in CPP/7zip/Crypto/HkdfBlake2sp.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ7ZAFUcoTPWLLwWuma-&open=AZ7ZAFUcoTPWLLwWuma-&pullRequest=505

Check warning on line 66 in CPP/7zip/Crypto/HkdfBlake2sp.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace the redundant type with "auto".

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ7ZAFUcoTPWLLwWuma7&open=AZ7ZAFUcoTPWLLwWuma7&pullRequest=505

Check warning on line 56 in CPP/7zip/Crypto/XChaCha20.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Change this raw for-loop to a range for-loop or an "std::ranges::for_each".

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYzyJAa7A7SGbzWB&open=AZ6_sYzyJAa7A7SGbzWB&pullRequest=505

Check warning on line 100 in CPP/7zip/Crypto/Cascade.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not use the constructor's initializer list for data member "_xcCounter". Use the in-class initializer instead.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY1CJAa7A7SGbzWz&open=AZ6_sY1CJAa7A7SGbzWz&pullRequest=505

Check warning on line 309 in CPP/7zip/Crypto/ChaCha20Simd.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Modify the macro definition so that it needs to be followed by a semicolon, or remove this empty statement.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sY0EJAa7A7SGbzWc&open=AZ6_sY0EJAa7A7SGbzWc&pullRequest=505

Check failure on line 744 in CPP/7zip/Archive/7z/7zHandler.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this code to not nest more than 3 if|for|do|while|switch statements.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYwAJAa7A7SGbzUO&open=AZ6_sYwAJAa7A7SGbzUO&pullRequest=505

Check warning on line 265 in CPP/7zip/Crypto/Cascade.h

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "std::string" instead of a C-style char array.

See more on https://sonarcloud.io/project/issues?id=mcmilk_7-Zip-zstd&issues=AZ6_sYy7JAa7A7SGbzVp&open=AZ6_sYy7JAa7A7SGbzVp&pullRequest=505