Skip to content

Commit

Permalink
Merge pull request #572 from Erior/feature/521
Browse files Browse the repository at this point in the history
Not so elegant perhaps for checking 7z encryption
  • Loading branch information
adamhathcock committed Feb 16, 2021
2 parents 403baf0 + eb81f97 commit fa61072
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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;
}
}

0 comments on commit fa61072

Please sign in to comment.