SymmetricAlgorithm.SetKeyCore(ReadOnlySpan<Byte>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定此實例的金鑰。
protected:
virtual void SetKeyCore(ReadOnlySpan<System::Byte> key);
protected virtual void SetKeyCore(ReadOnlySpan<byte> key);
abstract member SetKeyCore : ReadOnlySpan<byte> -> unit
override this.SetKeyCore : ReadOnlySpan<byte> -> unit
Protected Overridable Sub SetKeyCore (key As ReadOnlySpan(Of Byte))
參數
- key
- ReadOnlySpan<Byte>
這次的鑰匙。
例外狀況
設定鑰匙時發生錯誤。
備註
其他呼叫者也需同樣確保此方法僅在有效大小輸入時被呼叫。
基底類別的實作是指派屬性 Key 。
派生型別應覆寫此方法,以避免將金鑰複製到新陣列。