docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct RelayHMACKey

    Used to represent the HMACKey for the Relay Service

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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 RelayHMACKey

    Declaration
    public static RelayHMACKey FromByteArray(byte[] data)
    Parameters
    Type Name Description
    byte[] data

    Array to convert.

    Returns
    Type Description
    RelayHMACKey

    New RelayHMACKey.

    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
    RelayHMACKey

    Returns a RelayHMACKey constructed from the provided data.

    Exceptions
    Type Condition
    ArgumentException

    Provided byte array length is invalid, must be but got .

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)