Quote:
what do you mean instance of a class Sir? sorry for my beginner
If you don't know what an instance is, then you are trying to run before you can walk: you need to go right back to the beginning and start understanding the basics.
Let's talk about cars for a moment. A Car is a vehicle that has four wheels, that you Drive by manipulating it's controls. But you can't drive a Car to the shops, because a Car is a general concept rather than a specific vehicle. You can drive "that car", or "this car", or "your car" (or even "my car" if I give you the keys) because each of those "variables" reference a specific vehicle. "Your car" is the Blue Ford, registration number "ABC 123" and "My car" is that Red Mercedes, registration number "XYZ 456". each of those vehicles is an
instance of the generic class of Cars.
So in order to drive to the shops, you need to identify a specific instance of a Car that you are authorised (by possession of the keys) to Drive. In the real world you acquire that instance by begging, borrowing, buying, or stealing a specific vehicle.
In computer terms, you need the same thing - an instance of a class, and here things are a lot more clear cut: the only way to get an instance of the Car class is to create it via the
New
keyword:
Dim myCar As new Car("Mercedes", Color.Red, "XYZ 456")
When you create your CryptoStream, you are passing it an array of bytes when it specifically requires something else:
CryptoStream Constructor (Stream, ICryptoTransform, CryptoStreamMode) (System.Security.Cryptography)[
^]
You find an example of how to use it under the class description:
CryptoStream Class[
^]
But seriously: if you don't know the basics, then you should stop what you are doing and go right back to learning them first, or you are going to get horribly confused.