Java Signature getProvider() method with Examples Last Updated : 04 Dec, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The getProvider() method of java.security.Signature class is used to return the provider of this signature object. Syntax: public final Provider getProvider() Return Value: This method returns the provider of this signature object Below are the examples to illustrate the getProvider() method: Example 1: Java // Java program to demonstrate // getProvider() method import java.security.*; import java.util.*; public class GFG1 { public static void main(String[] argv) { try { // creating the object of Signature Signature sr = Signature.getInstance("NONEwithDSA"); // getting the provider // by using method getProvider() Provider provider = sr.getProvider(); // printing the provider name System.out.println("Provider : " + provider); } catch (NoSuchAlgorithmException e) { System.out.println("Exception thrown : " + e); } } } Output: Provider : SUN version 1.8 Example 2: Java // Java program to demonstrate // getProvider() method import java.security.*; import java.util.*; public class GFG1 { public static void main(String[] argv) { try { // creating the object of Signature Signature sr = Signature.getInstance("SHA1withDSA"); // getting the provider // by using method getProvider() Provider provider = sr.getProvider(); // printing the provider name System.out.println("Provider : " + provider); } catch (NoSuchAlgorithmException e) { System.out.println("Exception thrown : " + e); } } } Output: Provider : SUN version 1.8 Comment More infoAdvertise with us Next Article URL getProtocol() method in Java with Examples R rohitprasad3 Follow Improve Article Tags : Misc Java Java-Functions Java-security package Java-Signature +1 More Practice Tags : JavaMisc Similar Reads Java Signature getInstance() method with Examples getInstance(String algorithm) The getInstance() method of java.security.Provider class is used to return a Signature object that implements the specified signature algorithm. This method traverses the list of registered security Providers, starting with the most preferred Provider. A new Signature o 5 min read SecureRandom getProvider() method in Java with Examples The getProvider() method of java.security.SecureRandom class is used to return the provider of this SecureRandom object. Syntax: public final Provider getProvider() Return Value: This method returns the provider of this SecureRandom object. Below are the examples to illustrate the getProvider() meth 2 min read Provider.Service getProvider() method in Java with Examples The getProvider() method of java.security.Provider.Service class is used to return the provider of this provider service object. Syntax: public final Provider getProvider() Return Value: This method returns the provider of this provider service object. Below are the examples to illustrate the getPro 2 min read URL getProtocol() method in Java with Examples The getProtocol() function is a part of URL class. The function getProtocol() returns the Protocol of a specified URL. Function Signature public String getProtocol() Syntax url.getProtocol() Parameter This function does not require any parameter Return Type: The function returns String Type Below pr 2 min read URL getProtocol() method in Java with Examples The getProtocol() function is a part of URL class. The function getProtocol() returns the Protocol of a specified URL. Function Signature public String getProtocol() Syntax url.getProtocol() Parameter This function does not require any parameter Return Type: The function returns String Type Below pr 2 min read KeyStore getProvider() method in Java with Examples The getProvider() method of java.security.KeyStore class is used to get the Provider associated with this KeyStore instance. Syntax: public final Provider getProvider() Parameter: This method accepts nothing as a parameter. Return Value: This method returns the Provider associated with this KeyStore 3 min read Like