The Getimpl () method in the Security class

Source: Internet
Author: User

The Getimpl method in the Security class source code:

The Security.getimpl () method returns an array of objects.

The first bit of the array is based on the requested algorithm and an instance of the type object,

The second bit of the array is the unique identifier of the corresponding algorithm provider. Where the value of provider can be a null type, in which case the highest-priority provider is searched in the provider configuration file.

The following is the source

/*

* Returns an array of Objects:the first object in the array is

* An instance of implementation of the requested algorithm
* and type, and the second object in the array identifies the provider
* of that implementation.
* The <code>provider</code> argument can is null, in which case all
* configured providers is searched in order of preference.
*/
Static object[] Getimpl (string algorithm, String type, string provider)
Throws NoSuchAlgorithmException, Nosuchproviderexception {
if (Provider = = null) {
Return getinstance.getinstance
(Type, Getspiclass (type), algorithm). ToArray ();
} else {
Return getinstance.getinstance
(Type, Getspiclass (type), algorithm, provider). ToArray ();
}
}

The Getimpl () method in the Security class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.