Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
       * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
       * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
       * java/lang/Math.java: New override file.
       * java/lang/Character.java: Merged from Classpath.
       (start, end): Now 'int's.
       (canonicalName): New field.
       (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
       (UnicodeBlock): Added argument.
       (of): New overload.
       (forName): New method.
       Updated unicode blocks.
       (sets): Updated.
       * sources.am: Regenerated.
       * Makefile.in: Likewise.

From-SVN: r111942
This commit is contained in:
Mark Wielaard
2006-03-10 21:46:48 +00:00
parent 27079765d0
commit 8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions
@@ -1,5 +1,5 @@
/* InvalidKeySpecException.java -- invalid KeySpec Exception
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ import java.security.GeneralSecurityException;
* @author Mark Benvenuto
* @see KeySpec
* @since 1.2
* @status updated to 1.4
* @status updated to 1.5
*/
public class InvalidKeySpecException extends GeneralSecurityException
{
@@ -71,4 +71,26 @@ public class InvalidKeySpecException extends GeneralSecurityException
{
super(msg);
}
/**
* Create a new instance with a descriptive error message and
* a cause.
* @param s the descriptive error message
* @param cause the cause
* @since 1.5
*/
public InvalidKeySpecException(String s, Throwable cause)
{
super(s, cause);
}
/**
* Create a new instance with a cause.
* @param cause the cause
* @since 1.5
*/
public InvalidKeySpecException(Throwable cause)
{
super(cause);
}
}
@@ -38,9 +38,9 @@ exception statement from your version. */
package java.security.spec;
/**
* This class specifies a parameter spec for RSA PSS encoding scheme, as
* defined in the PKCS#1 v2.1.
*
* An implementation of {@link AlgorithmParameterSpec} for the RSA PSS encoding
* scheme.
*
* @since 1.4
* @see AlgorithmParameterSpec
* @see java.security.Signature
@@ -56,12 +56,13 @@ public class PSSParameterSpec implements AlgorithmParameterSpec
// --------------------------------------------------------------------------
/**
* Creates a new <code>PSSParameterSpec</code> given the salt length as
* defined in PKCS#1.
*
* @param saltLen the length of salt in bits to be used in PKCS#1 PSS encoding.
* @throws IllegalArgumentException if <code>saltLen</code> is less than
* <code>0</code>.
* Construct a new instance of <code>PSSParameterSpec</code> given a salt
* length.
*
* @param saltLen
* the length in bits of the salt.
* @throws IllegalArgumentException
* if <code>saltLen</code> is less than <code>0</code>.
*/
public PSSParameterSpec(int saltLen)
{
@@ -78,11 +79,7 @@ public class PSSParameterSpec implements AlgorithmParameterSpec
// Instance methods
// --------------------------------------------------------------------------
/**
* Returns the salt length in bits.
*
* @return the salt length.
*/
/** @return the length (in bits) of the salt. */
public int getSaltLength()
{
return this.saltLen;
@@ -40,9 +40,9 @@ package java.security.spec;
import java.math.BigInteger;
/**
* This class specifies an RSA multi-prime private key, as defined in the
* This class represents an RSA multi-prime private key, as defined in the
* PKCS#1 v2.1, using the <i>Chinese Remainder Theorem</i> (CRT) information
* values for efficiency.
* values.
*
* @since 1.4
* @see java.security.Key
@@ -70,29 +70,35 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
// --------------------------------------------------------------------------
/**
* <p>Creates a new <code>RSAMultiPrimePrivateCrtKeySpec</code> given the
* modulus, publicExponent, privateExponent, primeP, primeQ, primeExponentP,
* primeExponentQ, crtCoefficient, and otherPrimeInfo as defined in PKCS#1
* v2.1.</p>
*
* Constructs a new instance of <code>RSAMultiPrimePrivateCrtKeySpec</code>
* given the various PKCS#1 v2.1 parameters.
*
* <p>Note that <code>otherPrimeInfo</code> is cloned when constructing this
* object.</p>
*
* @param modulus the modulus n.
* @param publicExponent the public exponent e.
* @param privateExponent the private exponent d.
* @param primeP the prime factor p of n.
* @param primeQ the prime factor q of n.
* @param primeExponentP this is d mod (p-1).
* @param primeExponentQ this is d mod (q-1).
* @param crtCoefficient the Chinese Remainder Theorem coefficient q-1 mod p.
* @param otherPrimeInfo triplets of the rest of primes, <code>null</code>
* can be specified if there are only two prime factors (p and q).
* @throws NullPointerException if any of the parameters, i.e. modulus,
* publicExponent, privateExponent, primeP, primeQ, primeExponentP,
* primeExponentQ, crtCoefficient, is <code>null</code>.
* @throws IllegalArgumentException if an empty, i.e. 0-length,
* otherPrimeInfo is specified.
*
* @param modulus
* the modulus n.
* @param publicExponent
* the public exponent e.
* @param privateExponent
* the private exponent d.
* @param primeP
* the prime factor p of n.
* @param primeQ
* the prime factor q of n.
* @param primeExponentP
* this is d mod (p-1).
* @param primeExponentQ
* this is d mod (q-1).
* @param crtCoefficient
* the Chinese Remainder Theorem coefficient q-1 mod p.
* @param otherPrimeInfo
* triplets of the rest of primes, <code>null</code> can be
* specified if there are only two prime factors (p and q).
* @throws NullPointerException
* if any of the parameters is <code>null</code>.
* @throws IllegalArgumentException
* if an empty <code>otherPrimeInfo</code> is specified.
*/
public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
BigInteger publicExponent,
@@ -153,9 +159,9 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns the primeP.
* Returns the prime p.
*
* @return the primeP.
* @return the prime p.
*/
public BigInteger getPrimeP()
{
@@ -163,9 +169,9 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns the primeQ.
* Returns the prime q.
*
* @return the primeQ.
* @return the prime q.
*/
public BigInteger getPrimeQ()
{
@@ -173,9 +179,9 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns the primeExponentP.
* Returns d mod (p-1).
*
* @return the primeExponentP.
* @return d mod (p-1).
*/
public BigInteger getPrimeExponentP()
{
@@ -183,9 +189,9 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns the primeExponentQ.
* Returns d mod (q-1).
*
* @return the primeExponentQ.
* @return d mod (q-1).
*/
public BigInteger getPrimeExponentQ()
{
@@ -193,9 +199,9 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns the crtCoefficient.
* Returns the CRT Coefficient q-1 mod p.
*
* @return the crtCoefficient.
* @return the CRT Coefficient q-1 mod p.
*/
public BigInteger getCrtCoefficient()
{
@@ -203,10 +209,10 @@ public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec
}
/**
* Returns a copy of the otherPrimeInfo or <code>null</code> if there are
* only two prime factors (p and q).
* Returns a clone of <code>otherPrimeInfo</code> or <code>null</code> if
* it was <code>null</code> at construction time.
*
* @return the otherPrimeInfo.
* @return a cloned copy of <code>otherPrimeInfo</code>.
*/
public RSAOtherPrimeInfo[] getOtherPrimeInfo()
{
@@ -40,17 +40,8 @@ package java.security.spec;
import java.math.BigInteger;
/**
* This class represents the triplet (prime, exponent, and coefficient) inside
* RSA's OtherPrimeInfo structure, as defined in the PKCS#1 v2.1. The ASN.1
* syntax of RSA's OtherPrimeInfo is as follows:
*
* <pre>
* OtherPrimeInfo ::= SEQUENCE {
* prime INTEGER,
* exponent INTEGER,
* coefficient INTEGER
* }
* </pre>
* An in-memory representation of the RSA triplet (prime, exponent, and
* coefficient) inside a PKCS#1 v2.1 <i>OtherPrimeInfo</i> structure.
*
* @since 1.4
* @see RSAPrivateCrtKeySpec
@@ -69,14 +60,16 @@ public class RSAOtherPrimeInfo
// --------------------------------------------------------------------------
/**
* Creates a new <code>RSAOtherPrimeInfo</code> given the prime,
* primeExponent, and crtCoefficient as defined in PKCS#1.
*
* @param prime the prime factor of n.
* @param primeExponent the exponent.
* @param crtCoefficient the Chinese Remainder Theorem coefficient.
* @throws NullPointerException if any of the parameters, i.e. prime,
* primeExponent, crtCoefficient, is <code>null</code>.
* Constructs a new <code>RSAOtherPrimeInfo</code> given the PKCS#1 MPIs.
*
* @param prime
* the prime factor of n.
* @param primeExponent
* the exponent.
* @param crtCoefficient
* the Chinese Remainder Theorem coefficient.
* @throws NullPointerException
* if any of the parameters is <code>null</code>.
*/
public RSAOtherPrimeInfo(BigInteger prime, BigInteger primeExponent,
BigInteger crtCoefficient)
@@ -122,9 +115,9 @@ public class RSAOtherPrimeInfo
}
/**
* Returns the prime's crtCoefficient.
* Returns the CRT Coefficient.
*
* @return the crtCoefficient.
* @return the CRT Coefficient.
*/
public final BigInteger getCrtCoefficient()
{