question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArgumentNullException is thrown if we use AESKeySize = 256. 128 does work

See original GitHub issue

Steps to reproduce

  1. Install SharpZipLib.NETStandard on a Xamarin Android Project
  2. Execute:
private static async Task AddRawContentToZipAsync(ZipOutputStream zipStream, byte[] rawContent, string fileName) {
   var file = new ZipEntry(fileName) { AESKeySize = 256, Size = rawContent.Length };
   zipStream.PutNextEntry(file); -> EXCEPTION THROWN
   await zipStream.WriteAsync(rawContent, 0, rawContent.Length);
   zipStream.CloseEntry();
}

Expected behavior

Any Exception should be thrown

Actual behavior

An ArgumentNullException is thrown if we use AESKeySize = 256 after we call “zipStream.PutNextEntry()”. It works with AESKeySize = 128

Version of SharpZipLib

1.0.7

Obtained from (only keep the relevant lines)

  • Package installed using NuGet

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davspancommented, Apr 16, 2020

It seems to work with SharpZipLib, indeed! :Thank you very much! 👍 😃

0reactions
pikselcommented, Apr 15, 2020

Yes, the issue summary actually contains the row

  1. Install SharpZipLib.NETStandard on a Xamarin Android Project

Try using the latest “SharpZipLib” package (v1.2.0)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using AES encryption in C# - Stack Overflow
I can 't seem to find a nice clean example of using AES 128 bit encryption. Does anyone have some sample code? c#...
Read more >
C# AES Encryption
You 're obtaining more than 20 bytes from PBKDF2-HMAC-SHA-1 and the attacker doesn't need the data from the second block (12 IV bytes), ......
Read more >
How to Handle the ArgumentNullException in C# | Rollbar
The ArgumentNullException occurs in C# when null arguments are passed to a method in that expects non-null values.
Read more >
Does .NET framework support AES-256 CTR mode?
I 've implemented this code snippet to try to encrypt and decrypt an array of bytes, with great success. However, the requirement and...
Read more >
How to create AES encryption 256 bit key in C#
Encrypt the key with an asymmetric key and save it in a datastore: You can store the AES key in a database only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found