SymmetricAlgorithm.SetKeyCore(ReadOnlySpan<Byte>) 方法

定義

設定此實例的金鑰。

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

派生型別應覆寫此方法,以避免將金鑰複製到新陣列。

適用於