Adds a new provider, at a specified position. The position is the preference order in which providers are searched for requested algorithms. The position is 1-based, that is, 1 is most preferred, followed by 2, and so on.
If the given provider is installed at the requested position, the provider that used to be at that position, and all providers with a position greater than position
, are shifted up one position (towards the end of the list of installed providers).
A provider cannot be added if it is already installed.
If there is a security manager, the SecurityManager.checkSecurityAccess(java.lang.String)
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.