RandomNumberGenerator.GetHexString メソッド

定義

オーバーロード

名前 説明
GetHexString(Int32, Boolean)

暗号的にランダムな 16 進文字でいっぱいの文字列を作成します。

GetHexString(Span<Char>, Boolean)

バッファーに暗号的にランダムな 16 進文字を入力します。

GetHexString(Int32, Boolean)

ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs

暗号的にランダムな 16 進文字でいっぱいの文字列を作成します。

public static string GetHexString(int stringLength, bool lowercase = false);
static member GetHexString : int * bool -> string
Public Shared Function GetHexString (stringLength As Integer, Optional lowercase As Boolean = false) As String

パラメーター

stringLength
Int32

作成する文字列の長さ。

lowercase
Boolean

true 16 進数の文字を小文字にする必要がある場合。大文字にする必要がある場合は false します。 既定値は false です。

返品

ランダムな 16 進文字で設定された文字列。

注釈

この動作は、 GetString(ReadOnlySpan<Char>, Int32) を使用し、選択肢として 16 進文字を指定するのと同じです。 この実装は、16 進文字専用に最適化されています。

適用対象

GetHexString(Span<Char>, Boolean)

ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs
ソース:
RandomNumberGenerator.cs

バッファーに暗号的にランダムな 16 進文字を入力します。

public static void GetHexString(Span<char> destination, bool lowercase = false);
static member GetHexString : Span<char> * bool -> unit
Public Shared Sub GetHexString (destination As Span(Of Char), Optional lowercase As Boolean = false)

パラメーター

destination
Span<Char>

文字を受け取るバッファー。

lowercase
Boolean

true 16 進数の文字を小文字にする必要がある場合。大文字にする必要がある場合は false します。 既定値は false です。

注釈

この動作は、 GetItems<T>(ReadOnlySpan<T>, Span<T>) を使用し、選択肢として 16 進文字を指定するのと同じです。 この実装は、16 進文字専用に最適化されています。

適用対象