Struct RelayHMACKey
Used to represent the HMACKey for the Relay Service
Inherited Members
Namespace: Unity.Networking.Transport.Relay
Assembly: Unity.Networking.Transport.dll
Syntax
public struct RelayHMACKey
Fields
Value
The raw data of the HMAC key.
Declaration
public byte* Value
Field Value
Type | Description |
---|---|
byte* |
k_Length
The length in bytes of the RelayHMACKey.
Declaration
public const int k_Length = 64
Field Value
Type | Description |
---|---|
int |
Methods
FromByteArray(byte[])
Convert a byte array to a Relay
Declaration
public static RelayHMACKey FromByteArray(byte[] data)
Parameters
Type | Name | Description |
---|---|---|
byte[] | data | Array to convert. |
Returns
Type | Description |
---|---|
Relay |
New Relay |
FromBytePointer(byte*, int)
Converts a byte pointer to a RelayHMACKey.
Declaration
public static RelayHMACKey FromBytePointer(byte* data, int length)
Parameters
Type | Name | Description |
---|---|---|
byte* | data | The pointer to the data of the Allocation Id. |
int | length | The length of the data. |
Returns
Type | Description |
---|---|
Relay |
Returns a RelayHMACKey constructed from the provided data. |
Exceptions
Type | Condition |
---|---|
Argument |
Provided byte array length is invalid, must be {k_Length} but got {length}. |