© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
16 replies
Aeris

✅ Stream assistance needed

Alright I really need I'm completely lost. I have a file containing the following: 1 versioning byte used for retro-compatibility purposes, a 16 bytes long IV, X bytes of data and 64 bytes-long HMAC, everything in this exact order. Encryption is not the problem, decryption is. Since I used streams for better performances and less memory allocations than arrays, I read things in order, first the versioning byte to determine which method to use, then the IV to calculate the key and then problems are here. Since the HMAC is at the end, I need to decrypt the X following bytes = the rest of bytes - the 64 last. And I just can't. I tried using .SetLength on a new MemoryStream, also tried .Capacity, nothing is working. I am thus requesting your help.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

EF Core cursor problem [Assistance needed]
C#CC# / help
3y ago
✅ Looking for assistance in Deserializing Avro Binary stream
C#CC# / help
3y ago
❔ Docker Assistance
C#CC# / help
3y ago
❔ Regex assistance
C#CC# / help
4y ago