Show / Hide Table of Contents

    Method NewNameBasedV5

    NewNameBasedV5(Uuid, String)

    Returns a new Uuid version 5 (RFC 4122 variant) instance with a name-based value, created from the SHA-1 hash of a given namespace UUID and an arbitrary name string.

    The same namespace and name combination will always yield the same UUID.

    Declaration
    public static Uuid NewNameBasedV5(Uuid namespace, string name)
    Parameters
    Type Name Description
    Uuid namespace
    String name
    Returns
    Type Description
    Uuid A new version 5 Uuid instance based on the provided namespace and name.
    Exceptions
    Type Condition
    ArgumentException Failed to retrieve byte array from provided name.
    RuntimeException SHA-1 initialisation or computation failed.

    NewNameBasedV5(Uuid, Byte[])

    Returns a new Uuid version 5 (RFC 4122 variant) instance with a name-based value, created from the SHA-1 hash of a given namespace UUID and an arbitrary name byte array.

    The same namespace and name combination will always yield the same UUID.

    Declaration
    public static Uuid NewNameBasedV5(Uuid namespace, byte[] name)
    Parameters
    Type Name Description
    Uuid namespace
    Byte[] name
    Returns
    Type Description
    Uuid A new version 5 Uuid instance based on the provided namespace and name.
    Exceptions
    Type Condition
    ArgumentException Failed to retrieve byte array from provided name.
    RuntimeException SHA-1 initialisation or computation failed.
    Back to top Copyright © 2017-2018, xplo.re IT Services, Michael Maier. All rights reserved.