SecureRandom.GetInstance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetInstance(String, ISecureRandomParameters, Provider) |
Returns a |
GetInstance(String, String) |
Returns a |
GetInstance(String, ISecureRandomParameters, String) |
Returns a |
GetInstance(String, ISecureRandomParameters) |
Returns a |
GetInstance(String) |
Returns a |
GetInstance(String, Provider) |
Returns a |
GetInstance(String, ISecureRandomParameters, Provider)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm and supports the specified
SecureRandomParameters
request.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;Ljava/security/Provider;)Ljava/security/SecureRandom;", "", ApiSince=35)]
public static Java.Security.SecureRandom? GetInstance (string? algorithm, Java.Security.ISecureRandomParameters? params, Java.Security.Provider? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;Ljava/security/Provider;)Ljava/security/SecureRandom;", "", ApiSince=35)>]
static member GetInstance : string * Java.Security.ISecureRandomParameters * Java.Security.Provider -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
- params
- ISecureRandomParameters
the SecureRandomParameters
the newly created SecureRandom
object must support.
- provider
- Provider
the provider.
Returns
the new SecureRandom
object
- Attributes
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specified SecureRandomParameters
request.
A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the specified Provider
object is returned. Note that the specified Provider
object does not have to be registered in the provider list.
Added in 9.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String, String)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/SecureRandom;", "")]
public static Java.Security.SecureRandom? GetInstance (string? algorithm, string? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/SecureRandom;", "")>]
static member GetInstance : string * string -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
- provider
- String
the name of the provider.
Returns
the new SecureRandom
object
- Attributes
Exceptions
if the specified algorithm is not available.
if the specified provider is not available.
if algorithm
is null
.
if provider == null || provider.isEmpty()
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.
A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the specified provider is returned. The specified provider must be registered in the security provider list.
Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders()
method.
Added in 1.2.
Java documentation for java.security.SecureRandom.getInstance(java.lang.String, java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String, ISecureRandomParameters, String)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm and supports the specified
SecureRandomParameters
request.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;Ljava/lang/String;)Ljava/security/SecureRandom;", "", ApiSince=35)]
public static Java.Security.SecureRandom? GetInstance (string? algorithm, Java.Security.ISecureRandomParameters? params, string? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;Ljava/lang/String;)Ljava/security/SecureRandom;", "", ApiSince=35)>]
static member GetInstance : string * Java.Security.ISecureRandomParameters * string -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
- params
- ISecureRandomParameters
the SecureRandomParameters
the newly created SecureRandom
object must support.
- provider
- String
the name of the provider.
Returns
the new SecureRandom
object
- Attributes
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specified SecureRandomParameters
request.
A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the specified provider is returned. The specified provider must be registered in the security provider list.
Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders()
method.
Added in 9.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String, ISecureRandomParameters)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm and supports the specified
SecureRandomParameters
request.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;)Ljava/security/SecureRandom;", "", ApiSince=35)]
public static Java.Security.SecureRandom? GetInstance (string? algorithm, Java.Security.ISecureRandomParameters? params);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/SecureRandomParameters;)Ljava/security/SecureRandom;", "", ApiSince=35)>]
static member GetInstance : string * Java.Security.ISecureRandomParameters -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
- params
- ISecureRandomParameters
the SecureRandomParameters
the newly created SecureRandom
object must support.
Returns
the new SecureRandom
object
- Attributes
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm and supports the specified SecureRandomParameters
request.
This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the first Provider that supports the specified algorithm and the specified SecureRandomParameters
is returned.
Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders()
method.
Added in 9.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/security/SecureRandom;", "")]
public static Java.Security.SecureRandom? GetInstance (string? algorithm);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/security/SecureRandom;", "")>]
static member GetInstance : string -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
Returns
the new SecureRandom
object
- Attributes
Exceptions
if the specified algorithm is not available.
if algorithm
is null
.
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.
This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the first Provider that supports the specified algorithm is returned.
Note that the list of registered providers may be retrieved via the Security#getProviders() Security.getProviders()
method.
Added in 1.2.
Java documentation for java.security.SecureRandom.getInstance(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String, Provider)
Returns a SecureRandom
object that implements the specified
Random Number Generator (RNG) algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/SecureRandom;", "")]
public static Java.Security.SecureRandom? GetInstance (string? algorithm, Java.Security.Provider? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/SecureRandom;", "")>]
static member GetInstance : string * Java.Security.Provider -> Java.Security.SecureRandom
Parameters
- algorithm
- String
the name of the RNG algorithm.
See the SecureRandom
section in the
Java Security Standard Algorithm Names Specification
for information about standard RNG algorithm names.
- provider
- Provider
the provider.
Returns
the new SecureRandom
object
- Attributes
Exceptions
if the specified algorithm is not available.
if algorithm
is null
.
if provider == null
Remarks
Returns a SecureRandom
object that implements the specified Random Number Generator (RNG) algorithm.
A new SecureRandom
object encapsulating the SecureRandomSpi
implementation from the specified Provider
object is returned. Note that the specified Provider
object does not have to be registered in the provider list.
Added in 1.4.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.