summaryrefslogtreecommitdiff
path: root/javax/crypto
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-15 17:01:35 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-15 17:01:35 +0000
commit18addaa71c45fbdb60627f349e52027b3281e879 (patch)
treec9766b547b613c519a66d84ad2826876fb07d1b1 /javax/crypto
parentc61f399b1d3c471a8e459a4a2be645f95560f088 (diff)
downloadclasspath-18addaa71c45fbdb60627f349e52027b3281e879.tar.gz
2005-01-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of October 2004 HEAD patches to generics branch
Diffstat (limited to 'javax/crypto')
-rw-r--r--javax/crypto/Cipher.java6
-rw-r--r--javax/crypto/EncryptedPrivateKeyInfo.java6
-rw-r--r--javax/crypto/ExemptionMechanism.java5
-rw-r--r--javax/crypto/ExemptionMechanismException.java33
-rw-r--r--javax/crypto/KeyAgreement.java5
-rw-r--r--javax/crypto/KeyGenerator.java5
-rw-r--r--javax/crypto/Mac.java5
-rw-r--r--javax/crypto/SecretKey.java33
-rw-r--r--javax/crypto/SecretKeyFactory.java8
-rw-r--r--javax/crypto/SecretKeyFactorySpi.java2
-rw-r--r--javax/crypto/interfaces/DHPrivateKey.java3
-rw-r--r--javax/crypto/interfaces/DHPublicKey.java3
-rw-r--r--javax/crypto/interfaces/PBEKey.java3
-rw-r--r--javax/crypto/spec/SecretKeySpec.java1
14 files changed, 50 insertions, 68 deletions
diff --git a/javax/crypto/Cipher.java b/javax/crypto/Cipher.java
index d768d6ad7..2e2d28f7f 100644
--- a/javax/crypto/Cipher.java
+++ b/javax/crypto/Cipher.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package javax.crypto;
+import gnu.java.security.Engine;
+
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
@@ -50,12 +52,8 @@ import java.security.Security;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.security.spec.AlgorithmParameterSpec;
-
-import java.util.Enumeration;
import java.util.StringTokenizer;
-import gnu.java.security.Engine;
-
/**
* <p>This class implements a cryptographic cipher for transforming
* data.</p>
diff --git a/javax/crypto/EncryptedPrivateKeyInfo.java b/javax/crypto/EncryptedPrivateKeyInfo.java
index b64fbd6af..2d565f118 100644
--- a/javax/crypto/EncryptedPrivateKeyInfo.java
+++ b/javax/crypto/EncryptedPrivateKeyInfo.java
@@ -44,14 +44,12 @@ import gnu.java.security.der.DERReader;
import gnu.java.security.der.DERValue;
import java.io.IOException;
-
-import java.util.ArrayList;
-import java.util.List;
-
import java.security.AlgorithmParameters;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
+import java.util.ArrayList;
+import java.util.List;
/**
* An implementation of the <code>EncryptedPrivateKeyInfo</code> ASN.1
diff --git a/javax/crypto/ExemptionMechanism.java b/javax/crypto/ExemptionMechanism.java
index 7fa658e9e..2b2091e15 100644
--- a/javax/crypto/ExemptionMechanism.java
+++ b/javax/crypto/ExemptionMechanism.java
@@ -38,8 +38,9 @@ exception statement from your version. */
package javax.crypto;
-import java.lang.reflect.InvocationTargetException;
+import gnu.java.security.Engine;
+import java.lang.reflect.InvocationTargetException;
import java.security.AlgorithmParameters;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
@@ -50,8 +51,6 @@ import java.security.Provider;
import java.security.Security;
import java.security.spec.AlgorithmParameterSpec;
-import gnu.java.security.Engine;
-
/**
* An exemption mechanism, which will conditionally allow cryptography
* where it is not normally allowed, implements things such as <i>key
diff --git a/javax/crypto/ExemptionMechanismException.java b/javax/crypto/ExemptionMechanismException.java
index 42e1c5e9b..2c0665dc8 100644
--- a/javax/crypto/ExemptionMechanismException.java
+++ b/javax/crypto/ExemptionMechanismException.java
@@ -1,25 +1,22 @@
/* ExemptionMechanismException -- An error in an exemption mechanism.
Copyright (C) 2004 Free Software Foundation, Inc.
-This file is a part of GNU Classpath.
+This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at
-your option) any later version.
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
GNU Classpath 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 GNU Classpath; if not, write to the
-
- Free Software Foundation, Inc.,
- 59 Temple Place, Suite 330,
- Boston, MA 02111-1307
- USA
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -29,14 +26,14 @@ combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under terms
-of your choice, provided that you also meet, for each linked independent
-module, the terms and conditions of the license of that module. An
-independent module is a module which is not derived from or based on
-this library. If you modify this library, you may extend this exception
-to your version of the library, but you are not obligated to do so. If
-you do not wish to do so, delete this exception statement from your
-version. */
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package javax.crypto;
diff --git a/javax/crypto/KeyAgreement.java b/javax/crypto/KeyAgreement.java
index 6f6ed34e0..884e0f918 100644
--- a/javax/crypto/KeyAgreement.java
+++ b/javax/crypto/KeyAgreement.java
@@ -38,8 +38,9 @@ exception statement from your version. */
package javax.crypto;
-import java.lang.reflect.InvocationTargetException;
+import gnu.java.security.Engine;
+import java.lang.reflect.InvocationTargetException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
@@ -50,8 +51,6 @@ import java.security.SecureRandom;
import java.security.Security;
import java.security.spec.AlgorithmParameterSpec;
-import gnu.java.security.Engine;
-
/**
* Key agreement is a method in which two or more parties may agree on a
* secret key for symmetric cryptography or message authentication
diff --git a/javax/crypto/KeyGenerator.java b/javax/crypto/KeyGenerator.java
index 35753b036..3deda21fe 100644
--- a/javax/crypto/KeyGenerator.java
+++ b/javax/crypto/KeyGenerator.java
@@ -38,8 +38,9 @@ exception statement from your version. */
package javax.crypto;
-import java.lang.reflect.InvocationTargetException;
+import gnu.java.security.Engine;
+import java.lang.reflect.InvocationTargetException;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
@@ -48,8 +49,6 @@ import java.security.SecureRandom;
import java.security.Security;
import java.security.spec.AlgorithmParameterSpec;
-import gnu.java.security.Engine;
-
/**
* A generic producer of keys for symmetric cryptography. The keys
* returned may be simple wrappers around byte arrays, or, if the
diff --git a/javax/crypto/Mac.java b/javax/crypto/Mac.java
index 55f5be61b..301ec327e 100644
--- a/javax/crypto/Mac.java
+++ b/javax/crypto/Mac.java
@@ -38,8 +38,9 @@ exception statement from your version. */
package javax.crypto;
-import java.lang.reflect.InvocationTargetException;
+import gnu.java.security.Engine;
+import java.lang.reflect.InvocationTargetException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
@@ -49,8 +50,6 @@ import java.security.Provider;
import java.security.Security;
import java.security.spec.AlgorithmParameterSpec;
-import gnu.java.security.Engine;
-
/**
* This class implements a "message authentication code" (MAC), a method
* to ensure the integrity of data transmitted between two parties who
diff --git a/javax/crypto/SecretKey.java b/javax/crypto/SecretKey.java
index 85529b94d..ce7057e70 100644
--- a/javax/crypto/SecretKey.java
+++ b/javax/crypto/SecretKey.java
@@ -1,25 +1,22 @@
/* SecretKey.java -- A key for symmetric cryptography.
Copyright (C) 2004 Free Software Foundation, Inc.
-This file is a part of GNU Classpath.
+This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at
-your option) any later version.
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
GNU Classpath 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 GNU Classpath; if not, write to the
-
- Free Software Foundation, Inc.,
- 59 Temple Place, Suite 330,
- Boston, MA 02111-1307
- USA
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -29,14 +26,14 @@ combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under terms
-of your choice, provided that you also meet, for each linked independent
-module, the terms and conditions of the license of that module. An
-independent module is a module which is not derived from or based on
-this library. If you modify this library, you may extend this exception
-to your version of the library, but you are not obligated to do so. If
-you do not wish to do so, delete this exception statement from your
-version. */
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
package javax.crypto;
diff --git a/javax/crypto/SecretKeyFactory.java b/javax/crypto/SecretKeyFactory.java
index 92f18ec66..d543c57c7 100644
--- a/javax/crypto/SecretKeyFactory.java
+++ b/javax/crypto/SecretKeyFactory.java
@@ -38,18 +38,16 @@ exception statement from your version. */
package javax.crypto;
-import java.lang.reflect.InvocationTargetException;
+import gnu.java.security.Engine;
+import java.lang.reflect.InvocationTargetException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;
-import java.security.SecureRandom;
import java.security.Security;
-import java.security.spec.KeySpec;
import java.security.spec.InvalidKeySpecException;
-
-import gnu.java.security.Engine;
+import java.security.spec.KeySpec;
/**
* A secret key factory translates {@link SecretKey} objects to and from
diff --git a/javax/crypto/SecretKeyFactorySpi.java b/javax/crypto/SecretKeyFactorySpi.java
index 7b4763dff..41c815270 100644
--- a/javax/crypto/SecretKeyFactorySpi.java
+++ b/javax/crypto/SecretKeyFactorySpi.java
@@ -39,8 +39,8 @@ exception statement from your version. */
package javax.crypto;
import java.security.InvalidKeyException;
-import java.security.spec.KeySpec;
import java.security.spec.InvalidKeySpecException;
+import java.security.spec.KeySpec;
/**
* The <i>Service Provider Interface</i> (<b>SPI</b>) for the {@link
diff --git a/javax/crypto/interfaces/DHPrivateKey.java b/javax/crypto/interfaces/DHPrivateKey.java
index 63b9c15c4..7f9ea391f 100644
--- a/javax/crypto/interfaces/DHPrivateKey.java
+++ b/javax/crypto/interfaces/DHPrivateKey.java
@@ -57,9 +57,8 @@ import java.security.PrivateKey;
*/
public interface DHPrivateKey extends DHKey, PrivateKey
{
-
/** Compatible with JDK1.4. */
- static final long serialVersionUID = 2211791113380396553L;
+ long serialVersionUID = 2211791113380396553L;
/**
* Returns the private value <i>x</i>.
diff --git a/javax/crypto/interfaces/DHPublicKey.java b/javax/crypto/interfaces/DHPublicKey.java
index 5e0b35bf0..1fcb8144a 100644
--- a/javax/crypto/interfaces/DHPublicKey.java
+++ b/javax/crypto/interfaces/DHPublicKey.java
@@ -56,9 +56,8 @@ import java.security.PublicKey;
*/
public interface DHPublicKey extends DHKey, PublicKey
{
-
/** Compatible with JDK1.4. */
- static final long serialVersionUID = -6628103563352519193L;
+ long serialVersionUID = -6628103563352519193L;
/**
* Get the public value <i>y</i>.
diff --git a/javax/crypto/interfaces/PBEKey.java b/javax/crypto/interfaces/PBEKey.java
index 533491898..30d25323f 100644
--- a/javax/crypto/interfaces/PBEKey.java
+++ b/javax/crypto/interfaces/PBEKey.java
@@ -51,9 +51,8 @@ import javax.crypto.SecretKey;
*/
public interface PBEKey extends SecretKey
{
-
/** Compatible with JDK1.4. */
- static final long serialVersionUID = -1430015993304333921L;
+ long serialVersionUID = -1430015993304333921L;
/**
* Retruns the iteration count, or 0 if not specified.
diff --git a/javax/crypto/spec/SecretKeySpec.java b/javax/crypto/spec/SecretKeySpec.java
index 6d9f4b8fe..63c696840 100644
--- a/javax/crypto/spec/SecretKeySpec.java
+++ b/javax/crypto/spec/SecretKeySpec.java
@@ -39,6 +39,7 @@ exception statement from your version. */
package javax.crypto.spec;
import java.security.spec.KeySpec;
+
import javax.crypto.SecretKey;
/**