Security.AddProvider(Provider) Method

Definition

Adds a provider to the next position available.

[Android.Runtime.Register("addProvider", "(Ljava/security/Provider;)I", "")]
public static int AddProvider (Java.Security.Provider? provider);
[<Android.Runtime.Register("addProvider", "(Ljava/security/Provider;)I", "")>]
static member AddProvider : Java.Security.Provider -> int

Parameters

provider
Provider

the provider to be added.

Returns

the preference position in which the provider was added, or -1 if the provider was not added because it is already installed.

Attributes

Remarks

Adds a provider to the next position available.

If there is a security manager, the java.lang.SecurityManager#checkSecurityAccess method is called with the "insertProvider" permission target name to see if it's ok to add a new provider. If this permission check is denied, checkSecurityAccess is called again with the "insertProvider."+provider.getName() permission target name. If both checks are denied, a SecurityException is thrown.

Java documentation for java.security.Security.addProvider(java.security.Provider).

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