SymmetricAlgorithm.GenerateKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, generates a random key (Key) to use for the algorithm.
public:
abstract void GenerateKey();
public abstract void GenerateKey ();
abstract member GenerateKey : unit -> unit
Public MustOverride Sub GenerateKey ()
Remarks
In general, there is no reason to use this method, because CreateEncryptor()
or CreateEncryptor(null, null)
automatically generates both an initialization vector and a key. However, you may want to use the GenerateKey method to reuse a symmetric algorithm instance with a different key.
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.