Edit

Share via


SymmetricAlgorithm.SetKeyCore(ReadOnlySpan<Byte>) Method

Definition

Sets the key for this instance.

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))

Parameters

key
ReadOnlySpan<Byte>

The new key for this instance.

Exceptions

An error occurred while setting the key.

Remarks

Other callers are expected to similarly ensure that this method is only called with validly sized inputs.

The base class implementation is to assign the Key property.

Derived types should override this method to avoid copying the key into a new array.

Applies to