src/share/classes/java/security/KeyPairGeneratorSpi.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 27,45 **** import java.security.spec.AlgorithmParameterSpec; /** * <p> This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) ! * for the <code>KeyPairGenerator</code> class, which is used to generate * pairs of public and private keys. * * <p> All the abstract methods in this class must be implemented by each * cryptographic service provider who wishes to supply the implementation * of a key pair generator for a particular algorithm. * * <p> In case the client does not explicitly initialize the KeyPairGenerator ! * (via a call to an <code>initialize</code> method), each provider must * supply (and document) a default initialization. * For example, the <i>Sun</i> provider uses a default modulus size (keysize) * of 1024 bits. * * @author Benjamin Renaud --- 27,45 ---- import java.security.spec.AlgorithmParameterSpec; /** * <p> This class defines the <i>Service Provider Interface</i> (<b>SPI</b>) ! * for the {@code KeyPairGenerator} class, which is used to generate * pairs of public and private keys. * * <p> All the abstract methods in this class must be implemented by each * cryptographic service provider who wishes to supply the implementation * of a key pair generator for a particular algorithm. * * <p> In case the client does not explicitly initialize the KeyPairGenerator ! * (via a call to an {@code initialize} method), each provider must * supply (and document) a default initialization. * For example, the <i>Sun</i> provider uses a default modulus size (keysize) * of 1024 bits. * * @author Benjamin Renaud
*** 59,69 **** * algorithm-specific metric, such as modulus length, specified in * number of bits. * * @param random the source of randomness for this generator. * ! * @exception InvalidParameterException if the <code>keysize</code> is not * supported by this KeyPairGeneratorSpi object. */ public abstract void initialize(int keysize, SecureRandom random); /** --- 59,69 ---- * algorithm-specific metric, such as modulus length, specified in * number of bits. * * @param random the source of randomness for this generator. * ! * @exception InvalidParameterException if the {@code keysize} is not * supported by this KeyPairGeneratorSpi object. */ public abstract void initialize(int keysize, SecureRandom random); /**
*** 98,106 **** * Generates a key pair. Unless an initialization method is called * using a KeyPairGenerator interface, algorithm-specific defaults * will be used. This will generate a new key pair every time it * is called. * ! * @return the newly generated <tt>KeyPair</tt> */ public abstract KeyPair generateKeyPair(); } --- 98,106 ---- * Generates a key pair. Unless an initialization method is called * using a KeyPairGenerator interface, algorithm-specific defaults * will be used. This will generate a new key pair every time it * is called. * ! * @return the newly generated {@code KeyPair} */ public abstract KeyPair generateKeyPair(); }