Next: , Previous: Algorithm-Specific Attributes, Up: Keypairs


8.3 The IKeyPairGenerator Interface

All signature algorithms in GNU Crypto have their corresponding key pair generators, which implement this interface and provide the following methods:

— Function: void setup (java.util.Map attributes) throws java.lang.IllegalArgumentException

Initializes this key pair generator with the given attrubutes. The property names used are algorithm-dependent, and are described in the next section. This method throws a java.lang.IllegalArgumentException if the given attributes are incorrect or incomplete.

— Function: java.security.KeyPair generate ()

Generates and returns a new key pair based on the attributes used to configure this instance.

— Function: java.lang.String name ()

Returns the canonical name of the algorithm this class generates key pairs for.