Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 609
نمايش فراداده

This interface defines algorithm-specific KeyPairGenerator initialization methods for DSA keys. To generate a pair of DSA keys, use the static getInstance( ) factory method of java.security.KeyPairGenerator and specify "DSA" as the desired algorithm name. If you wish to perform DSA-specific initialization, cast the returned KeyPairGenerator to a DSAKeyPairGenerator and call one of the initialize( ) methods defined by this interface. Finally, generate the keys by calling generateKeyPair( ) on the KeyPairGenerator.

public interface 

DSAKeyPairGenerator { // Public Instance Methods void

initialize (DSAParams

params , java.security.SecureRandom

random ) throws java.security.InvalidParameterException; void

initialize (int

modlen , boolean

genParams , java.security.SecureRandom

random ) throws java.security.InvalidParameterException; }