RandomNumberGenerator.Create 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個密碼學隨機數產生器的實例。
多載
| 名稱 | Description |
|---|---|
| Create() |
建立一個密碼學隨機數產生器的預設實例,可用於產生隨機資料。 |
| Create(String) |
已淘汰.
建立指定實作的密碼學隨機數產生器實例。 |
Create()
建立一個密碼學隨機數產生器的預設實例,可用於產生隨機資料。
public:
static System::Security::Cryptography::RandomNumberGenerator ^ Create();
public static System.Security.Cryptography.RandomNumberGenerator Create();
static member Create : unit -> System.Security.Cryptography.RandomNumberGenerator
Public Shared Function Create () As RandomNumberGenerator
傳回
一個新的密碼學隨機數產生器實例。
另請參閱
適用於
Create(String)
警告
Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.
建立指定實作的密碼學隨機數產生器實例。
public:
static System::Security::Cryptography::RandomNumberGenerator ^ Create(System::String ^ rngName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
[System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.RandomNumberGenerator? Create(string rngName);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.RandomNumberGenerator? Create(string rngName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.RandomNumberGenerator? Create(string rngName);
public static System.Security.Cryptography.RandomNumberGenerator Create(string rngName);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
[<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : string -> System.Security.Cryptography.RandomNumberGenerator
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : string -> System.Security.Cryptography.RandomNumberGenerator
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : string -> System.Security.Cryptography.RandomNumberGenerator
static member Create : string -> System.Security.Cryptography.RandomNumberGenerator
Public Shared Function Create (rngName As String) As RandomNumberGenerator
參數
- rngName
- String
隨機數產生器的實作名稱。
傳回
一個新的密碼學隨機數產生器實例。
- 屬性