The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > java.security  [30 examples] > Public and Private Keys  [5 examples]

e197. Listing All Available Public/Private Key Generators

Retrieving the list of available key generators requires checking the services provided by all registered providers. The retrieved list of names can be used in creating a KeyPairGenerator object.
    // This method is implemented in e194 Listing All Available Cryptographic Services
    String[] names = getCryptoImpls("KeyPairGenerator");
An example of the output:
    OID.1.2.840.10040.4.1
    DiffieHellman
    1.3.14.3.2.12
    DH
    1.2.840.10040.4.1
    DSA
    RSA

 Related Examples
e198. Generating a Public/Private Key Pair
e199. Getting the Bytes of a Generated Key Pair
e200. Getting the Digital Signature Algorithm (DSA) Parameters of a Key Pair
e201. Creating Key Objects from a Set of Digital Signature Algorithm (DSA) Parameters

See also: Key Store    Message Digests    Permissions    Policy Files    Signatures   


© 2002 Addison-Wesley.