[PR #1] [MERGED] Added support for decryption of RAR files #775

Closed
opened 2026-01-29 22:17:32 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/1
Author: @hrasyid
Created: 7/16/2013
Status: Merged
Merged: 7/16/2013
Merged by: @adamhathcock

Base: masterHead: master


📝 Commits (10+)

  • 1d10ea2 Remove requirement for signature
  • ad42193 Modify test base to follow my folder structure
  • af8e4f9 Add test case for encrypted Rar
  • 22d181e recognize encrypted flag in archive header
  • c0b630c Decrypt rar - first attempt, test still fails
  • bb2dcce Remove comments from reference code
  • e78ead7 Temporarily do not treat warning as error
  • e1511bf Decrypt stream (in addition to header)
  • 13de04d Fix bug when no rijndael is used
  • 78cecda Update to reflect folder structure

📊 Changes

20 files changed (+490 additions, -49 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 SharpCompress.Test/Rar/RarReaderTests.cs (+32 -0)
SharpCompress.Test/Rar/Unit/RarHeaderFactoryTest.cs (+65 -0)
📝 SharpCompress.Test/SharpCompress.Test.csproj (+1 -0)
📝 SharpCompress.Test/TestBase.cs (+4 -4)
📝 SharpCompress/Common/Rar/Headers/ArchiveHeader.cs (+5 -0)
📝 SharpCompress/Common/Rar/Headers/RarHeader.cs (+2 -3)
📝 SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs (+22 -5)
SharpCompress/Common/Rar/RarCryptoWrapper.cs (+116 -0)
SharpCompress/Common/Rar/RarRijndael.cs (+113 -0)
📝 SharpCompress/Common/Rar/RarVolume.cs (+9 -2)
📝 SharpCompress/IO/MarkingBinaryReader.cs (+98 -24)
📝 SharpCompress/IO/NonDisposingStream.cs (+1 -4)
📝 SharpCompress/Reader/Rar/RarReader.cs (+11 -4)
📝 SharpCompress/Reader/Rar/RarReaderVolume.cs (+4 -2)
📝 SharpCompress/Reader/Rar/SingleVolumeRarReader.cs (+3 -1)
📝 SharpCompress/SharpCompress.Portable.csproj (+1 -0)
📝 SharpCompress/SharpCompress.csproj (+2 -0)
TestArchives/Archives/Rar.encrypted_filesAndHeader.rar (+0 -0)
TestArchives/Archives/Rar.encrypted_filesOnly.rar (+0 -0)

📄 Description

As discussed in e-mail, here is the pull request which include RAR decryption. Please review and make any changes if necessary. Note that currently there is still problem due to inavailability of Cryptography in Portable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/1 **Author:** [@hrasyid](https://github.com/hrasyid) **Created:** 7/16/2013 **Status:** ✅ Merged **Merged:** 7/16/2013 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`1d10ea2`](https://github.com/adamhathcock/sharpcompress/commit/1d10ea29dada38ba8a14aa9df65f34c43a14f1ac) Remove requirement for signature - [`ad42193`](https://github.com/adamhathcock/sharpcompress/commit/ad421936dc4729789bcac89bbe380fc24ca0f5ae) Modify test base to follow my folder structure - [`af8e4f9`](https://github.com/adamhathcock/sharpcompress/commit/af8e4f9da8386a45d1604f04e665c7748cf7903e) Add test case for encrypted Rar - [`22d181e`](https://github.com/adamhathcock/sharpcompress/commit/22d181e63770c214a300b776a678a4100c57614e) recognize encrypted flag in archive header - [`c0b630c`](https://github.com/adamhathcock/sharpcompress/commit/c0b630c7956a0a94b34dfd920c858ab280ea16e4) Decrypt rar - first attempt, test still fails - [`bb2dcce`](https://github.com/adamhathcock/sharpcompress/commit/bb2dcce57a716990b603f5d6a6add50a78de7d88) Remove comments from reference code - [`e78ead7`](https://github.com/adamhathcock/sharpcompress/commit/e78ead7bc3b93c37e971dec765bcdfccd4aef542) Temporarily do not treat warning as error - [`e1511bf`](https://github.com/adamhathcock/sharpcompress/commit/e1511bf3badaa9473e4656c5265dd5b73c822bf0) Decrypt stream (in addition to header) - [`13de04d`](https://github.com/adamhathcock/sharpcompress/commit/13de04ddd2bb6af7c61e56d150b1df36bf35542e) Fix bug when no rijndael is used - [`78cecda`](https://github.com/adamhathcock/sharpcompress/commit/78cecda03a8a6789738f51cb4e30ffcef6e3bc99) Update to reflect folder structure ### 📊 Changes **20 files changed** (+490 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `SharpCompress.Test/Rar/RarReaderTests.cs` (+32 -0) ➕ `SharpCompress.Test/Rar/Unit/RarHeaderFactoryTest.cs` (+65 -0) 📝 `SharpCompress.Test/SharpCompress.Test.csproj` (+1 -0) 📝 `SharpCompress.Test/TestBase.cs` (+4 -4) 📝 `SharpCompress/Common/Rar/Headers/ArchiveHeader.cs` (+5 -0) 📝 `SharpCompress/Common/Rar/Headers/RarHeader.cs` (+2 -3) 📝 `SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs` (+22 -5) ➕ `SharpCompress/Common/Rar/RarCryptoWrapper.cs` (+116 -0) ➕ `SharpCompress/Common/Rar/RarRijndael.cs` (+113 -0) 📝 `SharpCompress/Common/Rar/RarVolume.cs` (+9 -2) 📝 `SharpCompress/IO/MarkingBinaryReader.cs` (+98 -24) 📝 `SharpCompress/IO/NonDisposingStream.cs` (+1 -4) 📝 `SharpCompress/Reader/Rar/RarReader.cs` (+11 -4) 📝 `SharpCompress/Reader/Rar/RarReaderVolume.cs` (+4 -2) 📝 `SharpCompress/Reader/Rar/SingleVolumeRarReader.cs` (+3 -1) 📝 `SharpCompress/SharpCompress.Portable.csproj` (+1 -0) 📝 `SharpCompress/SharpCompress.csproj` (+2 -0) ➕ `TestArchives/Archives/Rar.encrypted_filesAndHeader.rar` (+0 -0) ➕ `TestArchives/Archives/Rar.encrypted_filesOnly.rar` (+0 -0) </details> ### 📄 Description As discussed in e-mail, here is the pull request which include RAR decryption. Please review and make any changes if necessary. Note that currently there is still problem due to inavailability of Cryptography in Portable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:17:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#775