Share via

Error when using CryptoStream.Read in .Net 7

Tuấn Tâm Bùi 0 Reputation points
2023-06-01T09:04:12.3233333+00:00

I was use CryptoStream.Read to read bytes from a MemoryStream into a byte[]. When i'm use .Net 5 it can read all bytes but when i'm use .Net 7 it will lost some bytes. In .Net 7, when i use CryptoStream.ReadExactly it can read all bytes i need but when use CryptoStream.Read it not. Why did it happend?

Developer technologies | .NET | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.