Skip to content

IStaticDataSource with AES 256 Encryption #385

@skhilliard

Description

@skhilliard

Steps to reproduce

  1. Define a simple data source that implements the IStaticDataSource interface:
public class CustomStaticDataSource : IStaticDataSource
{
	private Stream _stream;

	// Implement method from IStaticDataSource
	public Stream GetSource()
	{
		return _stream;
	}

	// Call this to provide the memorystream
	public void SetStream(Stream inputStream)
	{
		_stream = inputStream;
		_stream.Position = 0;
	}
}
  1. Use this data source to add a new ZIP entry to a ZipFile whose password is set using this method:

void Add(IStaticDataSource dataSource, ZipEntry entry);

Where the entry has the desired name and entry.AESKeySize is set to 256.

Expected behavior

Zip file is produced that is password protected using AES encryption.

Actual behavior

Zip file is produced, but using weaker ZipCrypto encryption.

Version of SharpZipLib

1.2.0 (for .NET Core)

Obtained from (only keep the relevant lines)

  • Package installed using NuGet

Metadata

Metadata

Assignees

No one assigned

    Labels

    encryptionzipRelated to ZIP file format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions