FileDocCategorySizeDatePackage
MyKeyPairGenerator1.javaAPI DocAndroid 1.5 API3932Wed May 06 22:41:06 BST 2009org.apache.harmony.security.tests.support

MyKeyPairGenerator1

public class MyKeyPairGenerator1 extends KeyPairGenerator
Additional class extends KeyPairGenerator

Fields Summary
public int
keySize
public SecureRandom
secureRandom
public AlgorithmParameterSpec
paramSpec
Constructors Summary
public MyKeyPairGenerator1()

        super("MyKeyPairGenerator1");
    
public MyKeyPairGenerator1(String pp)

        super(pp);
    
Methods Summary
public java.security.KeyPairgenerateKeyPair()

        try {
            return new KeyPair(new PubKey(), new PrivKey());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    
public java.lang.StringgetAlgorithm()

        return "MyKeyPairGenerator1";
    
public static final java.lang.StringgetResAlgorithm()

        return "MyKeyPairGenerator1";
    
public voidinitialize(int keysize, java.security.SecureRandom random)

        if ((keysize < 0) || ((keysize % 100) != 0)) {
            throw new InvalidParameterException("Incorrect keysize parameter");
        }
        if (random == null) {
            throw new InvalidParameterException("Incorrect random");
        }
        keySize = keysize;
        secureRandom = random;
    
public voidinitialize(java.security.spec.AlgorithmParameterSpec param, java.security.SecureRandom random)

        if (random == null) {
            throw new InvalidParameterException("Incorrect random");
        }
        if (param == null) {
            throw new InvalidAlgorithmParameterException("Incorrect param");
        }
        paramSpec = param;
        secureRandom = random;