

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Provider getInfo() method in Java
An easily readable description of the provider and its services can be obtained using the method getInfo() in the class java.security.Provider. This method requires no parameters and it returns a provider and services description.
A program that demonstrates this is given as follows −
Example
import java.security.*; import java.util.*; public class Demo { public static void main(String[] argv) throws Exception { try { SecureRandom sRandom = SecureRandom.getInstance("SHA1PRNG"); Provider p = sRandom.getProvider(); System.out.println("The information is as follows:\n"); System.out.println(p.getInfo()); } catch (NoSuchAlgorithmException e) { System.out.println("Error!!! NoSuchAlgorithmException"); } } }
Output
The information is as follows: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS & DKS keystores; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores, JavaPolicy Policy; JavaLoginConfig Configuration)
- Related Questions & Answers
- Provider elements() method in Java
- Provider entrySet() method in Java
- Provider keys() method in Java
- Provider keySet() method in Java
- Provider values() method in Java
- Provider get() method in Java
- Provider getName() method in Java
- Provider getVersion() method in Java
- Provider toString() method in Java
- Provider getProperty() method in Java
- Provider getService() method in Java
- How can we create a Service Provider interface in Java 9?
- Using MDX provider in SAP HANA
- What are extender provider components in C#?
- Who is the best VoIP provider in the USA?
Advertisements