AlgorithmParameters.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) |
Returns a parameter object for the specified algorithm. |
GetInstance(String, Provider) |
Returns a parameter object for the specified algorithm. |
GetInstance(String, String) |
Returns a parameter object for the specified algorithm. |
GetInstance(String)
Returns a parameter object for the specified algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/security/AlgorithmParameters;", "")]
public static Java.Security.AlgorithmParameters? GetInstance (string? algorithm);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/security/AlgorithmParameters;", "")>]
static member GetInstance : string -> Java.Security.AlgorithmParameters
Parameters
- algorithm
- String
the name of the algorithm requested.
Returns
the new parameter object
- Attributes
Exceptions
if the specified algorithm is not available.
if algorithm
is null
.
Remarks
Returns a parameter object for the specified algorithm.
This method traverses the list of registered security Providers, starting with the most preferred Provider. A new AlgorithmParameters object encapsulating the AlgorithmParametersSpi 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.
The returned parameter object must be initialized via a call to init
, using an appropriate parameter specification or parameter encoding.
Java documentation for java.security.AlgorithmParameters.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 parameter object for the specified algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/AlgorithmParameters;", "")]
public static Java.Security.AlgorithmParameters? GetInstance (string? algorithm, Java.Security.Provider? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljava/security/AlgorithmParameters;", "")>]
static member GetInstance : string * Java.Security.Provider -> Java.Security.AlgorithmParameters
Parameters
- algorithm
- String
the name of the algorithm requested.
- provider
- Provider
the name of the provider.
Returns
the new parameter object
- Attributes
Exceptions
if the specified algorithm is not available.
if algorithm
is null
.
if provider == null
Remarks
Returns a parameter object for the specified algorithm.
A new AlgorithmParameters object encapsulating the AlgorithmParametersSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.
The returned parameter object must be initialized via a call to init
, using an appropriate parameter specification or parameter encoding.
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.
Applies to
GetInstance(String, String)
Returns a parameter object for the specified algorithm.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/AlgorithmParameters;", "")]
public static Java.Security.AlgorithmParameters? GetInstance (string? algorithm, string? provider);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljava/security/AlgorithmParameters;", "")>]
static member GetInstance : string * string -> Java.Security.AlgorithmParameters
Parameters
- algorithm
- String
the name of the algorithm requested.
- provider
- String
the name of the provider.
Returns
the new parameter object
- Attributes
Exceptions
if the specified algorithm is not available.
if the specified provider is not available.
if provider == null || provider.isEmpty()
if algorithm
is null
.
Remarks
Returns a parameter object for the specified algorithm.
A new AlgorithmParameters object encapsulating the AlgorithmParametersSpi 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.
The returned parameter object must be initialized via a call to init
, using an appropriate parameter specification or parameter encoding.
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.