# Re: getCiphers[]

Jan Luehe (Jan.Luehe@Eng)
Mon, 30 Jun 1997 17:42:26 -0700 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Marianne Mueller: "Re: Java Security Q&A Not Accessible"
- Previous message: Mark Rose: "Java Security Q&A Not Accessible"
- Maybe in reply to: Eric Westerkamp: "getCiphers[]"

    Date: Mon, 30 Jun 1997 17:42:26 -0700 (PDT)

    From: Jan Luehe <Jan.Luehe@Eng>

    Subject: Re: getCiphers[]

    To: java-security@web2.javasoft.com, eric@quickstream.com

Hi Eric:

> It would be really usefull if the providers class would give a
> function like getCiphers() which returns an array of available
> ciphers from that provider.

I agree.

> I noticed that Providers inherits from properties. There is a
> KeyGenerator.DES property in the SUN provider. Will all
> algorithms that support KeyGenerator contain a property like
> KeyGenerator.XXXXX ?
>
> If so then I could use this as my list.

This may give you incorrect results. For example, a provider
may implement DES key generation, but not the DES algorithm
itself (not that this would make any sense).

It would probably be safer to check for the "Cipher", "MessageDigest",
or "Signature" keywords when you evaluate a provider:

put("Cipher.DES.BLOCK.NONE", "sun.security.provider.DES");
put("Cipher.DES", "sun.security.provider.DES");
put("MessageDigest.MD5", "sun.security.provider.MD5");
put("Signature.DSA", "sun.security.provider.DSA");

This will tell you which algorithms are implemented by the provider.

We are currently extending/enhancing/fixing JCE1.1.
As part of this, we will add new methods to the "Provider" class
which will make it easier for users to retrieve this kind of information
from an installed provider.

Thanks,

Jan Luehe

- Next message: Marianne Mueller: "Re: Java Security Q&A Not Accessible"
- Previous message: Mark Rose: "Java Security Q&A Not Accessible"
- Maybe in reply to: Eric Westerkamp: "getCiphers[]"