Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not so elegant perhaps for checking 7z encryption #572

Merged
merged 2 commits into from Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SharpCompress/Common/SevenZip/SevenZipEntry.cs
Expand Up @@ -32,7 +32,7 @@ internal SevenZipEntry(SevenZipFilePart filePart)

public override DateTime? ArchivedTime => null;

public override bool IsEncrypted => false;
public override bool IsEncrypted => FilePart.IsEncrypted;

public override bool IsDirectory => FilePart.Header.IsDir;

Expand Down
2 changes: 2 additions & 0 deletions src/SharpCompress/Common/SevenZip/SevenZipFilePart.cs
Expand Up @@ -102,5 +102,7 @@ internal CompressionType GetCompression()
throw new NotImplementedException();
}
}

internal bool IsEncrypted => Folder!._coders.FindIndex(c => c._methodId._id == CMethodId.K_AES_ID) != -1;
}
}