Edit

Share via


SymmetricAlgorithm.SetKey(ReadOnlySpan<Byte>) Method

Definition

Sets the key for this instance.

public:
 void SetKey(ReadOnlySpan<System::Byte> key);
public void SetKey(ReadOnlySpan<byte> key);
member this.SetKey : ReadOnlySpan<byte> -> unit
Public Sub SetKey (key As ReadOnlySpan(Of Byte))

Parameters

key
ReadOnlySpan<Byte>

The new key for this instance.

Exceptions

The key size is invalid.

-or-

An error occurred while setting the key.

Applies to