summaryrefslogtreecommitdiff
path: root/java/security/spec
diff options
context:
space:
mode:
authorMark Benvenuto <mcb54@columbia.edu>1999-11-19 02:15:06 +0000
committerMark Benvenuto <mcb54@columbia.edu>1999-11-19 02:15:06 +0000
commit62694a418b7c541be7dd6eb34c5dbd62b5b1836b (patch)
tree4341eb058c8eb64bbd99ec9b609f0bb49056fe25 /java/security/spec
parent0da3e7423e79828115a3dcc3de9de825edd35251 (diff)
downloadclasspath-62694a418b7c541be7dd6eb34c5dbd62b5b1836b.tar.gz
Updated the AUTHORS file so I am reflected as an author. Commited some JDK 1.3 Beta updates to java.security
Diffstat (limited to 'java/security/spec')
-rw-r--r--java/security/spec/RSAKeyGenParameterSpec.java77
1 files changed, 77 insertions, 0 deletions
diff --git a/java/security/spec/RSAKeyGenParameterSpec.java b/java/security/spec/RSAKeyGenParameterSpec.java
new file mode 100644
index 000000000..d98806fc7
--- /dev/null
+++ b/java/security/spec/RSAKeyGenParameterSpec.java
@@ -0,0 +1,77 @@
+/* RSAKeyGenParameterSpec.java --- RSA Key Generator Parameter Spec Class
+
+ Copyright (c) 1999 by Free Software Foundation, Inc.
+ Written by Mark Benvenuto <mcb@gnu.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation, version 2. (see COPYING.LIB)
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. */
+
+package java.security.spec;
+import java.math.BigInteger;
+
+/**
+ This class generates a set of RSA Key parameters used in the generation
+ of RSA keys.
+
+ @since JDK 1.3
+
+ @author Mark Benvenuto
+*/
+public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec
+{
+ private int keysize;
+ private BigInteger publicExponent;
+
+ /**
+ Public Exponent F0 = 3
+ */
+ public static final BigInteger F0 = new BigInteger("3");
+
+ /**
+ Public Exponent F4 = 3
+ */
+ public static final BigInteger F4 = new BigInteger("65537");
+
+ /**
+ Create a new RSAKeyGenParameterSpec to store the RSA key's keysize
+ and public exponent
+
+ @param keysize Modulus size of key in bits
+ @param publicExponent - the exponent
+ */
+ public RSAKeyGenParameterSpec(int keysize, BigInteger publicExponent)
+ {
+ this.keysize = keysize;
+ this.publicExponent = publicExponent;
+ }
+
+ /**
+ Return the size of the key.
+
+ @return the size of the key.
+ */
+ public int getKeysize()
+ {
+ return keysize;
+ }
+
+ /**
+ Return the public exponent.
+
+ @return the public exponent.
+ */
+ public BigInteger getPublicExponent()
+ {
+ return publicExponent;
+ }
+}