harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r769463 [9/9] - in /harmony/enhanced/classlib/trunk/modules/security/src/main/java/common: java/security/ java/security/acl/ java/security/cert/ java/security/interfaces/ java/security/spec/ javax/security/cert/
Date Tue, 28 Apr 2009 17:01:47 GMT
Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldF2m.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldF2m.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldF2m.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldF2m.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -28,8 +23,8 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameters specifying a <i>characteristic 2 finite field</i> of an
+ * elliptic curve.
  */
 public class ECFieldF2m implements ECField {
     // Mid terms array length for trinomial basis
@@ -48,7 +43,13 @@
     private final int[] ks;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECFieldF2m} with {@code 2^m} elements with a normal
+     * basis.
+     * 
+     * @param m
+     *            the exponent {@code m} for the number of elements.
+     * @throws IllegalArgumentException
+     *             if {@code m <= zero}.
      */
     public ECFieldF2m(int m) {
         this.m = m;
@@ -60,7 +61,20 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECFieldF2m} with {@code 2^m} elements with a polynomial
+     * basis and the reduction polynomial based on {@code rp}.
+     * <p>
+     * The reduction polynomial must be either <i>trinomial</i> or
+     * <i>pentanomial</i>.
+     *
+     * @param m
+     *            the exponent {@code m} for the number of elements.
+     * @param rp
+     *            the base of the reduction polynomial with the n-th bit
+     *            corresponding to the n-th coefficient of the reduction
+     *            polynomial.
+     * @throws IllegalArgumentException
+     *             if {@code m <= zero} or the {@code rp} is invalid.
      */
     public ECFieldF2m(int m, BigInteger rp) {
         this.m = m;
@@ -93,7 +107,20 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECFieldF2m} with {@code 2^m} elements with
+     * a polynomial basis and the reduction polynomial based on {@code ks}.
+     * <p>
+     * The reduction polynomial must be either <i>trinomial</i> or
+     * <i>pentanomial</i>.
+     * 
+     * @param m
+     *            the exponent {@code m} for the number of elements.
+     * @param ks
+     *            the base of the reduction polynomial with coefficients
+     *            given in descending order.     
+     * @throws IllegalArgumentException
+     *             if {@code m <= zero} or the reduction polynomial is not
+     *             valid.
      */
     public ECFieldF2m(int m, int[] ks) {
         this.m = m;
@@ -142,7 +169,12 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns whether the specified object equals to this finite field.
+     * 
+     * @param obj
+     *            the object to compare to this finite field.
+     * @return {@code true} if the specified object is equal to this finite field,
+     *         otherwise {@code false}.
      */
     public boolean equals(Object obj) {
         // object equals to itself
@@ -171,21 +203,31 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the size of this finite field (in bits).
+     * 
+     * @return the size of this finite field (in bits).
      */
     public int getFieldSize() {
         return m;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent {@code m} for this finite field, with {@code 2^m} as
+     * the number of elements.
+     * 
+     * @return the exponent {@code m} for this finite field
      */
     public int getM() {
         return m;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns a copy of the integer array containing the order of the middle
+     * term(s) of the reduction polynomial for a polynomial basis.
+     * 
+     * @return a copy of the integer array containing the order of the middle
+     *         term(s) of the reduction polynomial for a polynomial basis or
+     *         {@code null} for a normal basis.
      */
     public int[] getMidTermsOfReductionPolynomial() {
         // Defensively copies private array
@@ -201,14 +243,22 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the base of the reduction polynomial with the n-th bit
+     * corresponding to the n-th coefficient of the reduction polynomial for a
+     * polynomial basis.
+     * 
+     * @return the base of the reduction polynomial with the n-th bit
+     *         corresponding to the n-th coefficient of the reduction polynomial
+     *         for a polynomial basis or {@code null} for a normal basis.
      */
     public BigInteger getReductionPolynomial() {
         return rp;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the hashcode value for this finite field.
+     * 
+     * @return the hashcode value for this finite field.
      */
     public int hashCode() {
         return rp == null ? m : m + rp.hashCode();

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldFp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldFp.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldFp.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECFieldFp.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,15 +22,21 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameters specifying a <i>prime finite field</i> of an
+ * elliptic curve.
  */
 public class ECFieldFp implements ECField {
     // Prime
     private final BigInteger p;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new prime finite field of an elliptic curve with the specified
+     * prime {@code p}.
+     * 
+     * @param p
+     *            the prime value {@code p}.
+     * @throws IllegalArgumentException
+     *             if {@code p <= zero}.
      */
     public ECFieldFp(BigInteger p) {
         this.p = p;
@@ -49,21 +50,30 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the size of the finite field (in bits).
+     * 
+     * @return the size of the finite field (in bits).
      */
     public int getFieldSize() {
         return p.bitLength();
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime value {@code p} for this finite field.
+     * 
+     * @return the prime value {@code p} for this finite field.
      */
     public BigInteger getP() {
         return p;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns whether the specified object is equal to this finite field.
+     * 
+     * @param obj
+     *            the object to compare to this finite field.
+     * @return {@code true} if the specified object is equal to this finite field,
+     *         otherwise {@code false}.
      */
     public boolean equals(Object obj) {
         // object equals itself
@@ -77,7 +87,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the hashcode value for this finite field.
+     * 
+     * @return the hashcode value for this finite field.
      */
     public int hashCode() {
         return p.hashCode();

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECGenParameterSpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECGenParameterSpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECGenParameterSpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECGenParameterSpec.java Tue Apr 28 17:01:41 2009
@@ -15,18 +15,12 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameter specification used to generate elliptic curve domain parameters. 
  */
 public class ECGenParameterSpec implements AlgorithmParameterSpec {
     // Standard (or predefined) name for EC domain
@@ -34,7 +28,11 @@
     private final String name;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECGenParameterSpec} with the specified standard or
+     * predefined name of the to-be-generated domain parameter.
+     * 
+     * @param name
+     *            the name of the elliptic curve domain parameter.
      */
     public ECGenParameterSpec(String name) {
         this.name = name;
@@ -44,7 +42,10 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name (standard or predefined) of the to-be-generated elliptic
+     * curve domain parameter.
+     * 
+     * @return the name
      */
     public String getName() {
         return name;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECParameterSpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECParameterSpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECParameterSpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECParameterSpec.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,8 +22,7 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameter specification used with Elliptic Curve Cryptography (ECC). 
  */
 public class ECParameterSpec implements AlgorithmParameterSpec {
     // Elliptic curve for which this is parameter
@@ -41,7 +35,20 @@
     private final int cofactor;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECParameterSpec} with the specified elliptic curve,
+     * the base point, the order of the generator (or base point) and the
+     * co-factor.
+     * 
+     * @param curve
+     *            the elliptic curve.
+     * @param generator
+     *            the generator (or base point).
+     * @param order
+     *            the order of the generator.
+     * @param cofactor
+     *            the co-factor.
+     * @throws IllegalArgumentException
+     *             if {@code order <= zero} or {@code cofactor <= zero}.
      */
     public ECParameterSpec(EllipticCurve curve, ECPoint generator,
             BigInteger order, int cofactor) {
@@ -71,28 +78,36 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code cofactor}.
+     * 
+     * @return the {@code cofactor}.
      */
     public int getCofactor() {
         return cofactor;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the elliptic curve.
+     * 
+     * @return the elliptic curve.
      */
     public EllipticCurve getCurve() {
         return curve;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the generator (or base point).
+     * 
+     * @return the generator (or base point).
      */
     public ECPoint getGenerator() {
         return generator;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the order of the generator.
+     * 
+     * @return the order of the generator.
      */
     public BigInteger getOrder() {
         return order;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPoint.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPoint.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPoint.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPoint.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,12 +22,12 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * A Point on an Elliptic Curve in barycentric (or affine) coordinates.  
  */
 public class ECPoint {
+
     /**
-     * @com.intel.drl.spec_ref
+     * The point on an Elliptic Curve at infinity.
      */
     public static final ECPoint POINT_INFINITY = new ECPoint();
     // affine X coordinate of this point
@@ -47,7 +42,12 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new point at the specified coordinates.
+     * 
+     * @param affineX
+     *            the x-coordinate.
+     * @param affineY
+     *            the y-coordinate.
      */
     public ECPoint(BigInteger affineX, BigInteger affineY) {
         this.affineX = affineX;
@@ -61,21 +61,31 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the x-coordinate.
+     * 
+     * @return the x-coordinate, or {@code null} for the infinite point.
      */
     public BigInteger getAffineX() {
         return affineX;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the y-coordinate.
+     * 
+     * @return the y-coordinate, or {@code null} fot the infinite point.
      */
     public BigInteger getAffineY() {
         return affineY;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns whether the specified object and this elliptic curve point are
+     * equal.
+     * 
+     * @param other
+     *            the object to compare.
+     * @return {@code true} if the specified object and this elliptic curve
+     *         point are equal, otherwise {@code false}.
      */
     public boolean equals(Object other) {
         if (this == other) {
@@ -95,7 +105,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the hashcode of this elliptic curve point.
+     * 
+     * @return the hashcode of this elliptic curve point.
      */
     public int hashCode() {
         if (this.affineX != null) {

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPrivateKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPrivateKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPrivateKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPrivateKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,8 +22,7 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameters specifying an Elliptic Curve (EC) private key. 
  */
 public class ECPrivateKeySpec implements KeySpec {
     // Private value associated with this key
@@ -37,7 +31,13 @@
     private final ECParameterSpec params;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECPrivateKeySpec} with the specified private value
+     * {@code S} and parameter specification.
+     * 
+     * @param s
+     *            the private value {@code S}.
+     * @param params
+     *            the domain parameter specification.
      */
     public ECPrivateKeySpec(BigInteger s, ECParameterSpec params) {
         this.s = s;
@@ -52,14 +52,18 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the domain parameter specification.
+     * 
+     * @return the domain parameter specification.
      */
     public ECParameterSpec getParams() {
         return params;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the private value {@code S}.
+     * 
+     * @return the private value {@code S}.
      */
     public BigInteger getS() {
         return s;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPublicKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPublicKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPublicKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/ECPublicKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,18 +15,12 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameters specifying an Elliptic Curve (EC) public key. 
  */
 public class ECPublicKeySpec implements KeySpec {
     // The public point
@@ -35,7 +29,15 @@
     private final ECParameterSpec params;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code ECPublicKey} with the specified public elliptic
+     * curve point and parameter specification.
+     * 
+     * @param w
+     *            the public elliptic curve point {@code W}.
+     * @param params
+     *            the domain parameter specification.
+     * @throws IllegalArgumentException
+     *             if the specified point {@code W} is at infinity.
      */
     public ECPublicKeySpec(ECPoint w, ECParameterSpec params) {
         this.w = w;
@@ -55,14 +57,18 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the domain parameter specification.
+     * 
+     * @return the domain parameter specification.
      */
     public ECParameterSpec getParams() {
         return params;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the public elliptic curve point {@code W}.
+     * 
+     * @return the public elliptic curve point {@code W}.
      */
     public ECPoint getW() {
         return w;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EllipticCurve.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EllipticCurve.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EllipticCurve.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EllipticCurve.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -28,8 +23,7 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * An Elliptic Curve with its necessary values.
  */
 public class EllipticCurve {
 
@@ -50,7 +44,19 @@
     private volatile int hash;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code EllipticCurve} with the specified field,
+     * coefficients and seed.
+     * 
+     * @param field
+     *            the finite field of this elliptic curve.
+     * @param a
+     *            the coefficient {@code a}.
+     * @param b
+     *            the coefficient {@code b}.
+     * @param seed
+     *            the seed used for the generation of the curve.
+     * @throws IllegalArgumentException
+     *             if the specified coefficients are not in the specified field.
      */
     public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) {
         this.field = field;
@@ -95,35 +101,54 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code EllipticCurve} with the specified field and
+     * coefficients.
+     * 
+     * @param field
+     *            the finite field of this elliptic curve.
+     * @param a
+     *            the coefficient {@code a}.
+     * @param b
+     *            the coefficient {@code b}.
+     * @throws IllegalArgumentException
+     *             if the specified coefficients are not in the specified field.
      */
     public EllipticCurve(ECField field, BigInteger a, BigInteger b) {
         this(field, a, b, null);
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the coefficient {@code a} of this elliptic curve.
+     * 
+     * @return the coefficient {@code a} of this elliptic curve.
      */
     public BigInteger getA() {
         return a;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the coefficient {@code b} of this elliptic curve.
+     * 
+     * @return the coefficient {@code b} of this elliptic curve.
      */
     public BigInteger getB() {
         return b;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the finite field of this elliptic curve.
+     * 
+     * @return the finite field of this elliptic curve.
      */
     public ECField getField() {
         return field;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns a copy of the seed that was used to generate this elliptic curve.
+     * 
+     * @return a copy of the seed that was used to generate this elliptic curve,
+     *         or {@code null} if none specified.
      */
     public byte[] getSeed() {
         if (seed == null) {
@@ -137,7 +162,12 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns whether the specified object equals to this elliptic curve.
+     * 
+     * @param other
+     *            the object to compare.
+     * @return {@code true} if the specified object is equal to this elliptic
+     *         curve, otherwise {@code false}.
      */
     public boolean equals(Object other) {
         if (this == other) {
@@ -153,7 +183,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the hashcode of this elliptic curve.
+     * 
+     * @return the hashcode of this elliptic curve.
      */
     public int hashCode() {
         // hash init is delayed

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EncodedKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EncodedKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EncodedKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/EncodedKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,23 +15,21 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The abstract key specification for a public or a private key in encoded
+ * format.
  */
 public abstract class EncodedKeySpec implements KeySpec {
     // Encoded key
     private final byte[] encodedKey;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code EncodedKeySpec} with the specified encoded key bytes.
+     * 
+     * @param encodedKey
+     *            the encoded key bytes.
      */
     public EncodedKeySpec(byte[] encodedKey) {
         // Defensively copies parameter
@@ -42,7 +40,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the encoded key bytes.
+     * 
+     * @return the encoded key bytes.
      */
     public byte[] getEncoded() {
         // Defensively copies private array
@@ -53,7 +53,11 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the encoding format of this encoded key
+     * specification.
+     * 
+     * @return the name of the encoding format of this encoded key
+     *         specification.
      */
     public abstract String getFormat();
 }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidKeySpecException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidKeySpecException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidKeySpecException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidKeySpecException.java Tue Apr 28 17:01:41 2009
@@ -15,51 +15,55 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.security.GeneralSecurityException;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when an invalid key specification is
+ * encountered.
  */
 public class InvalidKeySpecException extends GeneralSecurityException {
+
     /**
-     * @com.intel.drl.spec_ref
+     * The serial version identifier.
      */
     private static final long serialVersionUID = 3546139293998810778L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidKeySpecException} with the specified message.
+     * 
+     * @param msg
+     *            the detail message of this exception.
      */
     public InvalidKeySpecException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidKeySpecException}.
      */
     public InvalidKeySpecException() {
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidKeySpecException} with the specified message
+     * and cause.
+     * 
+     * @param message
+     *            the detail message of this exception.
+     * @param cause
+     *            the cause of this exception.
      */
     public InvalidKeySpecException(String message, Throwable cause) {
         super(message, cause);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidKeySpecException} with the specified cause.
+     * 
+     * @param cause
+     *            the cause of this exception.
      */
     public InvalidKeySpecException(Throwable cause) {
         super(cause);

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidParameterSpecException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidParameterSpecException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidParameterSpecException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/InvalidParameterSpecException.java Tue Apr 28 17:01:41 2009
@@ -15,37 +15,34 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.security.GeneralSecurityException;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when an invalid parameter specification is
+ * encountered.
  */
 public class InvalidParameterSpecException extends GeneralSecurityException {
+
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * The serial version identifier.
      */
     private static final long serialVersionUID = -970468769593399342L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidParameterSpecException} with the specified
+     * message.
+     * 
+     * @param msg
+     *            the detail message for this exception.
      */
     public InvalidParameterSpecException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code InvalidParameterSpecException}.
      */
     public InvalidParameterSpecException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/KeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/KeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/KeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/KeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,16 +15,11 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The marker interface for key specifications. The purpose is
+ * to group key specifications for cryptographic keys.
  */
 public interface KeySpec {
 }
\ No newline at end of file

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/MGF1ParameterSpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/MGF1ParameterSpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/MGF1ParameterSpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/MGF1ParameterSpec.java Tue Apr 28 17:01:41 2009
@@ -15,37 +15,44 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameter specification for the Mask Generation Function (MGF1) in
+ * the RSA-PSS Signature and OAEP Padding scheme.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard
  */
 public class MGF1ParameterSpec implements AlgorithmParameterSpec {
+
     /**
-     * @com.intel.drl.spec_ref
+     * The predefined MGF1 parameter specification with an "SHA-1" message
+     * digest.
      */
     public static final MGF1ParameterSpec SHA1 =
         new MGF1ParameterSpec("SHA-1"); //$NON-NLS-1$
+
     /**
-     * @com.intel.drl.spec_ref
+     * The predefined MGF1 parameter specification with an "SHA-256" message
+     * digest.
      */
     public static final MGF1ParameterSpec SHA256 =
         new MGF1ParameterSpec("SHA-256"); //$NON-NLS-1$
+
     /**
-     * @com.intel.drl.spec_ref
+     * The predefined MGF1 parameter specification with an "SHA-384" message
+     * digest.
      */
     public static final MGF1ParameterSpec SHA384 =
         new MGF1ParameterSpec("SHA-384"); //$NON-NLS-1$
+
     /**
-     * @com.intel.drl.spec_ref
+     * The predefined MGF1 parameter specification with an "SHA-512" message
+     * digest.
      */
     public static final MGF1ParameterSpec SHA512 =
         new MGF1ParameterSpec("SHA-512"); //$NON-NLS-1$
@@ -54,7 +61,11 @@
     private final String mdName;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code MGF1ParameterSpec} with the specified message digest
+     * algorithm name.
+     * 
+     * @param mdName
+     *            the name of the message digest algorithm.
      */
     public MGF1ParameterSpec(String mdName) {
         this.mdName = mdName;
@@ -64,7 +75,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the message digest algorithm.
+     * 
+     * @return the name of the message digest algorithm.
      */
     public String getDigestAlgorithm() {
         return mdName;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PKCS8EncodedKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PKCS8EncodedKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PKCS8EncodedKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PKCS8EncodedKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,20 +15,20 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The key specification for an encoded private key in ASN.1 format as defined
+ * in the PKCS#8 standard.  
  */
 public class PKCS8EncodedKeySpec extends EncodedKeySpec {    
+
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code PKCS8EncodedKeySpec} with the specified encoded key
+     * bytes.
+     * 
+     * @param encodedKey
+     *            the encoded key bytes.
      */
     public PKCS8EncodedKeySpec(byte[] encodedKey) {
         // Super class' ctor makes defensive parameter copy
@@ -36,7 +36,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns a copy of the encoded key bytes.
+     * 
+     * @return a copy of the encoded key bytes.
      */
     public byte[] getEncoded() {
         // Super class' getEncoded() always returns a new array
@@ -44,7 +46,10 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the encoding format of this encoded key
+     * specification.
+     * 
+     * @return the string "PKCS#8".
      */
     public final String getFormat() {
         return "PKCS#8"; //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PSSParameterSpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PSSParameterSpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PSSParameterSpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/PSSParameterSpec.java Tue Apr 28 17:01:41 2009
@@ -15,22 +15,28 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameter specification for the RSA-PSS Signature scheme.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard.
  */
 public class PSSParameterSpec implements AlgorithmParameterSpec {   
+
     /**
-     * @com.intel.drl.spec_ref
+     * The default parameter specification. It specifies the following parameters:
+     * <ul>
+     * <li>message digest: {@code "SHA-1"}</li>
+     * <li>mask generation function (<i>mgf</i>): {@code "MGF1"}</li>
+     * <li>parameters for the <i>mgf</i>: {@link MGF1ParameterSpec#SHA1}</li>
+     * <li>salt length: {@code 20}</li>
+     * <li>trailer field: {@code -1}</li>
+     * </ul>
      */
     public static final PSSParameterSpec DEFAULT = new PSSParameterSpec(20);
 
@@ -46,7 +52,13 @@
     private final int saltLen;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code PSSParameterSpec} with the specified salt length 
+     * and the default values.
+     * 
+     * @param saltLen
+     *            the salt length (in bits).
+     * @throws IllegalArgumentException
+     *             if {@code saltLen} is negative.
      */
     public PSSParameterSpec(int saltLen) {
         if (saltLen < 0) {
@@ -60,7 +72,22 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref     * 
+     * Creates a new {@code PSSParameterSpec} with the specified message digest
+     * name, mask generation function name, mask generation function parameters,
+     * salt length, and trailer field value.
+     * 
+     * @param mdName
+     *            the name of the message digest algorithm.
+     * @param mgfName
+     *            the name of the mask generation function algorithm.
+     * @param mgfSpec
+     *            the parameter for the mask generation function algorithm.
+     * @param saltLen
+     *            the salt length (in bits).
+     * @param trailerField
+     *            the trailer field value.
+     * @throws IllegalArgumentException
+     *             if {@code saltLen} or {@code trailerField} is negative.
      */
     public PSSParameterSpec(String mdName, String mgfName,
             AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField) {
@@ -85,35 +112,46 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the length of the salt (in bits).
+     * 
+     * @return the length of the salt (in bits).
      */
     public int getSaltLength() {
         return saltLen;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the message digest algorithm.
+     * 
+     * @return the name of the message digest algorithm.
      */
     public String getDigestAlgorithm() {
         return mdName;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the mask generation function algorithm.
+     * 
+     * @return the name of the mask generation function algorithm.
      */
     public String getMGFAlgorithm() {
         return mgfName;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the parameter for the mask generation function algorithm.
+     * 
+     * @return the parameter for the mask generation function algorithm, or
+     *         {@code null} if none specified.
      */
     public AlgorithmParameterSpec getMGFParameters() {
         return mgfSpec;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the trailer field value.
+     * 
+     * @return the trailer field value.
      */
     public int getTrailerField() {
         return trailerField;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAKeyGenParameterSpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAKeyGenParameterSpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAKeyGenParameterSpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAKeyGenParameterSpec.java Tue Apr 28 17:01:41 2009
@@ -15,26 +15,22 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The parameter specification for generating an RSA key pair. 
  */
 public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec {    
+
     /**
-     * @com.intel.drl.spec_ref
+     * The value of the public exponent {@code F0} = 3.
      */
     public static final BigInteger F0 = BigInteger.valueOf(3L);
+
     /**
-     * @com.intel.drl.spec_ref
+     * The value of the public exponent {@code F4} = 65537.
      */
     public static final BigInteger F4 = BigInteger.valueOf(65537L);
 
@@ -44,7 +40,13 @@
     private final BigInteger publicExponent;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAKeyGenParameterSpec} with the specified key size
+     * and public exponent.
+     * 
+     * @param keysize
+     *            the size of the modulus (number of bits).
+     * @param publicExponent
+     *            the value of the public exponent.
      */
     public RSAKeyGenParameterSpec(int keysize, BigInteger publicExponent) {
         this.keysize = keysize;
@@ -52,14 +54,18 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the size of the modulus (number of bits).
+     * 
+     * @return the size of the modulus (number of bits).
      */
     public int getKeysize() {
         return keysize;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the value of the public exponent.
+     * 
+     * @return the value of the public exponent.
      */
     public BigInteger getPublicExponent() {
         return publicExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,8 +22,12 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The key specification of a RSA multi-prime private key with the Chinese
+ * Remainder Theorem (CRT) information values used.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard.
  */
 public class RSAMultiPrimePrivateCrtKeySpec extends RSAPrivateKeySpec {
     // Public Exponent
@@ -47,7 +46,31 @@
     private final RSAOtherPrimeInfo[] otherPrimeInfo;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAMultiPrimePrivateCrtKeySpec} with the specified
+     * modulus, public exponent, private exponent, prime factors, prime
+     * exponents, crt coefficient, and additional primes.
+     * 
+     * @param modulus
+     *            the modulus {@code n}.
+     * @param publicExponent
+     *            the public exponent {@code e}.
+     * @param privateExponent
+     *            the private exponent {@code d}.
+     * @param primeP
+     *            the prime factor {@code p} of {@code n}.
+     * @param primeQ
+     *            the prime factor {@code q} of {@code n}.
+     * @param primeExponentP
+     *            the exponent of the prime {@code p}.
+     * @param primeExponentQ
+     *            the exponent of the prime {@code q}.
+     * @param crtCoefficient
+     *            the CRT coefficient {@code q^-1 mod p}.
+     * @param otherPrimeInfo
+     *            the information for the additional primes or {@code null} if
+     *            there are only the two primes ({@code p, q}).
+     * @throws IllegalArgumentException
+     *             if {@code otherPrimeInfo} is not null but empty.
      */
     public RSAMultiPrimePrivateCrtKeySpec(
             BigInteger modulus,
@@ -109,14 +132,19 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the CRT coefficient, {@code q^-1 mod p}.
+     * 
+     * @return the CRT coefficient, {@code q^-1 mod p}.
      */
     public BigInteger getCrtCoefficient() {
         return crtCoefficient;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the information for the additional primes.
+     * 
+     * @return the information for the additional primes, or {@code null} if
+     *         there are only the two primes ({@code p, q}).
      */
     public RSAOtherPrimeInfo[] getOtherPrimeInfo() {
         // Clone array (if not null) to prevent subsequent modification
@@ -131,35 +159,45 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent of the prime {@code p}.
+     * 
+     * @return the exponent of the prime {@code p}.
      */
     public BigInteger getPrimeExponentP() {
         return primeExponentP;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent of the prime {@code q}.
+     * 
+     * @return the exponent of the prime {@code q}.
      */
     public BigInteger getPrimeExponentQ() {
         return primeExponentQ;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime factor {@code p}.
+     * 
+     * @return the prime factor {@code p}.
      */
     public BigInteger getPrimeP() {
         return primeP;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime factor {@code q}.
+     * 
+     * @return the prime factor {@code q}.
      */
     public BigInteger getPrimeQ() {
         return primeQ;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the public exponent {@code e}.
+     * 
+     * @return the public exponent {@code e}.
      */
     public BigInteger getPublicExponent() {
         return publicExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAOtherPrimeInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAOtherPrimeInfo.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAOtherPrimeInfo.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAOtherPrimeInfo.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
@@ -27,8 +22,12 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The additional prime information specified as triplet of primes, a prime
+ * exponent, and a Chinese Remainder Theorem (CRT) coefficient.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard.
  */
 public class RSAOtherPrimeInfo {
     // Prime
@@ -39,7 +38,15 @@
     private final BigInteger crtCoefficient;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAOtherPrimeInfo} with the specified prime,
+     * exponent, and CRT coefficient.
+     * 
+     * @param prime
+     *            the prime factor.
+     * @param primeExponent
+     *            the prime exponent.
+     * @param crtCoefficient
+     *            the CRT coefficient.
      */
     public RSAOtherPrimeInfo(BigInteger prime,
             BigInteger primeExponent, BigInteger crtCoefficient) {
@@ -58,21 +65,27 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the CRT coefficient.
+     * 
+     * @return the CRT coefficient.
      */
     public final BigInteger getCrtCoefficient() {
         return crtCoefficient;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime factor.
+     * 
+     * @return the prime factor.
      */
     public final BigInteger getPrime() {
         return prime;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent.
+     * 
+     * @return the exponent.
      */
     public final BigInteger getExponent() {
         return primeExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateCrtKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateCrtKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateCrtKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateCrtKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,18 +15,17 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The key specification of a RSA private key using Chinese Remainder Theorem
+ * (CRT) values.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard.
  */
 public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec {    
     // Public Exponent
@@ -43,7 +42,26 @@
     private final BigInteger crtCoefficient;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAMultiPrimePrivateCrtKeySpec} with the specified
+     * modulus, public exponent, private exponent, prime factors, prime
+     * exponents, crt coefficient, and additional primes.
+     * 
+     * @param modulus
+     *            the modulus {@code n}.
+     * @param publicExponent
+     *            the public exponent {@code e}.
+     * @param privateExponent
+     *            the private exponent {@code d}.
+     * @param primeP
+     *            the prime factor {@code p} of {@code n}.
+     * @param primeQ
+     *            the prime factor {@code q} of {@code n}.
+     * @param primeExponentP
+     *            the exponent of the prime {@code p}.
+     * @param primeExponentQ
+     *            the exponent of the prime {@code q}.
+     * @param crtCoefficient
+     *            the CRT coefficient {@code q^-1 mod p}.
      */
     public RSAPrivateCrtKeySpec(BigInteger modulus,
                                 BigInteger publicExponent,
@@ -65,42 +83,54 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the CRT coefficient, {@code q^-1 mod p}.
+     * 
+     * @return the CRT coefficient, {@code q^-1 mod p}.
      */
     public BigInteger getCrtCoefficient() {
         return crtCoefficient;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent of the prime {@code p}.
+     * 
+     * @return the exponent of the prime {@code p}.
      */
     public BigInteger getPrimeExponentP() {
         return primeExponentP;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the exponent of the prime {@code q}.
+     * 
+     * @return the exponent of the prime {@code q}.
      */
     public BigInteger getPrimeExponentQ() {
         return primeExponentQ;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime factor {@code p}.
+     * 
+     * @return the prime factor {@code p}.
      */
     public BigInteger getPrimeP() {
         return primeP;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the prime factor {@code q}.
+     * 
+     * @return the prime factor {@code q}.
      */
     public BigInteger getPrimeQ() {
         return primeQ;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the public exponent {@code e}.
+     * 
+     * @return the public exponent {@code e}.
      */
     public BigInteger getPublicExponent() {
         return publicExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPrivateKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,18 +15,16 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The key specification of a RSA private key.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard
  */
 public class RSAPrivateKeySpec implements KeySpec {    
     // Modulus
@@ -35,7 +33,13 @@
     private final BigInteger privateExponent;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAPrivateKeySpec} with the specified modulus and
+     * private exponent.
+     * 
+     * @param modulus
+     *            the modulus {@code n}.
+     * @param privateExponent
+     *            the private exponent {@code e}
      */
     public RSAPrivateKeySpec(BigInteger modulus, BigInteger privateExponent) {
         this.modulus = modulus;
@@ -43,14 +47,18 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the modulus {@code n}.
+     * 
+     * @return the modulus {@code n}.
      */
     public BigInteger getModulus() {
         return modulus;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the private exponent {@code e}.
+     * 
+     * @return the private exponent {@code e}.
      */
     public BigInteger getPrivateExponent() {
         return privateExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPublicKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPublicKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPublicKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/RSAPublicKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,17 +15,16 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 import java.math.BigInteger;
 
 /**
- * @com.intel.drl.spec_ref
+ * The key specification of a RSA public key.
+ * <p>
+ * Defined in the <a
+ * href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
+ * standard.
  */
 public class RSAPublicKeySpec implements KeySpec {
     // Modulus
@@ -34,7 +33,13 @@
     private final BigInteger publicExponent;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code RSAPublicKeySpec} with the specified modulus and
+     * public exponent.
+     * 
+     * @param modulus
+     *            the modulus {@code n}.
+     * @param publicExponent
+     *            the public exponent {@code d}.
      */
     public RSAPublicKeySpec(BigInteger modulus, BigInteger publicExponent) {
         this.modulus = modulus;
@@ -42,14 +47,18 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the modulus {@code n}.
+     * 
+     * @return the modulus {@code n}.
      */
     public BigInteger getModulus() {
         return modulus;
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the public exponent {@code d}.
+     * 
+     * @return the public exponent {@code d}.
      */
     public BigInteger getPublicExponent() {
         return publicExponent;

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/X509EncodedKeySpec.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/X509EncodedKeySpec.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/X509EncodedKeySpec.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/spec/X509EncodedKeySpec.java Tue Apr 28 17:01:41 2009
@@ -15,20 +15,19 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vladimir N. Molotkov
-* @version $Revision$
-*/
-
 package java.security.spec;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The key specification of an X.509 encoded key in ASN.1 format.
  */
 public class X509EncodedKeySpec extends EncodedKeySpec {
+
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code X509EncodedKeySpec} with the specified encoded key
+     * bytes.
+     * 
+     * @param encodedKey
+     *            the encoded key bytes.
      */
     public X509EncodedKeySpec(byte[] encodedKey) {
         // Super class' ctor makes defensive parameter copy
@@ -36,7 +35,9 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the encoded key bytes.
+     * 
+     * @return the encoded key bytes.
      */
     public byte[] getEncoded() {
         // Super class' getEncoded() always returns a new array
@@ -44,7 +45,10 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the encoding format of this encoded key
+     * specification.
+     * 
+     * @return the string "X.509".
      */
     public final String getFormat() {
         return "X.509"; //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/Certificate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/Certificate.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/Certificate.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/Certificate.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander Y. Kleymenov
-* @version $Revision$
-*/
-
 package javax.security.cert;
 
 import java.security.InvalidKeyException;
@@ -32,17 +27,32 @@
 import javax.security.cert.CertificateException;
 
 /**
- * @com.intel.drl.spec_ref
+ * Abstract class to represent identity certificates. It represents a way to
+ * verify the binding of a Principal and its public key. Examples are X.509,
+ * PGP, and SDSI.
+ * <p>
+ * Note: This package is provided only for compatibility reasons.
+ * It contains a simplified version of the java.security.cert package that was
+ * previously used by JSSE (Java SSL package). All applications that do not have
+ * to be compatible with older versions of JSSE (that is before Java SDK 1.5)
+ * should only use java.security.cert.
  */
 public abstract class Certificate {
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code Certificate}.
      */
     public Certificate() {}
 
     /**
-     * @com.intel.drl.spec_ref
+     * Compares the argument to this Certificate. If both have the same bytes
+     * they are assumed to be equal.
+     *
+     * @param obj
+     *            the {@code Certificate} to compare with this object
+     * @return <code>true</code> if {@code obj} is the same as this
+     *         {@code Certificate}, <code>false</code> otherwise
+     * @see #hashCode
      */
     public boolean equals(Object obj) {
         if (obj == this) {
@@ -60,7 +70,12 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns an integer hash code for the receiver. Any two objects which
+     * return <code>true</code> when passed to <code>equals</code> must answer
+     * the same value for this method.
+     *
+     * @return the receiver's hash
+     * @see #equals
      */
     public int hashCode() {
         int res = 0;
@@ -75,13 +90,30 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the encoded representation for this certificate.
+     *
+     * @return the encoded representation for this certificate.
+     * @throws CertificateEncodingException
+     *             if encoding fails.
      */
     public abstract byte[] getEncoded()
             throws CertificateEncodingException;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Verifies that this certificate was signed with the given public key.
+     *
+     * @param key
+     *            public key for which verification should be performed.
+     * @throws CertificateException
+     *             if encoding errors are detected
+     * @throws NoSuchAlgorithmException
+     *             if an unsupported algorithm is detected
+     * @throws InvalidKeyException
+     *             if an invalid key is detected
+     * @throws NoSuchProviderException
+     *             if there is no default provider
+     * @throws SignatureException
+     *             if signature errors are detected
      */
     public abstract void verify(PublicKey key)
             throws CertificateException, NoSuchAlgorithmException,
@@ -89,7 +121,23 @@
                    SignatureException;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Verifies that this certificate was signed with the given public key. Uses
+     * the signature algorithm given by the provider.
+     *
+     * @param key
+     *            public key for which verification should be performed.
+     * @param sigProvider
+     *            the name of the signature provider.
+     * @exception CertificateException
+     *                if encoding errors are detected
+     * @exception NoSuchAlgorithmException
+     *                if an unsupported algorithm is detected
+     * @exception InvalidKeyException
+     *                if an invalid key is detected
+     * @exception NoSuchProviderException
+     *                if the specified provider does not exists.
+     * @exception SignatureException
+     *                if signature errors are detected
      */
     public abstract void verify(PublicKey key, String sigProvider)
             throws CertificateException, NoSuchAlgorithmException, 
@@ -97,12 +145,17 @@
                    SignatureException;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns a string containing a concise, human-readable description of the
+     * receiver.
+     *
+     * @return a printable representation for the receiver.
      */
     public abstract String toString();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the public key corresponding to this certificate.
+     *
+     * @return the public key corresponding to this certificate.
      */
     public abstract PublicKey getPublicKey();
 }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateEncodingException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateEncodingException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateEncodingException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateEncodingException.java Tue Apr 28 17:01:41 2009
@@ -15,18 +15,19 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
 
 package javax.security.cert;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when an error occurs while a {@code Certificate}
+ * is being encoded.
+ * <p>
+ * Note: This package is provided only for compatibility reasons. It contains a
+ * simplified version of the java.security.cert package that was previously used
+ * by JSSE (Java SSL package). All applications that do not have to be
+ * compatible with older versions of JSSE (that is before Java SDK 1.5) should
+ * only use java.security.cert.
  */
-
 public class CertificateEncodingException extends CertificateException {
 
     /**
@@ -35,16 +36,18 @@
     private static final long serialVersionUID = -8187642723048403470L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateEncodingException} with the specified
+     * message.
+     *
+     * @param msg
+     *            the detail message for the exception.
      */
     public CertificateEncodingException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateEncodingException}.
      */
     public CertificateEncodingException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateException.java Tue Apr 28 17:01:41 2009
@@ -15,16 +15,17 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
 
 package javax.security.cert;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The base class for all {@code Certificate} related exceptions.
+ * <p>
+ * Note: This package is provided only for compatibility reasons. It contains a
+ * simplified version of the java.security.cert package that was previously used
+ * by JSSE (Java SSL package). All applications that do not have to be
+ * compatible with older versions of JSSE (that is before Java SDK 1.5) should
+ * only use java.security.cert.
  */
 public class CertificateException extends Exception {
 
@@ -34,16 +35,17 @@
     private static final long serialVersionUID = -5757213374030785290L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateException} with the specified message.
+     *
+     * @param msg
+     *            the detail message for the exception.
      */
     public CertificateException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateException}.
      */
     public CertificateException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateExpiredException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateExpiredException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateExpiredException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateExpiredException.java Tue Apr 28 17:01:41 2009
@@ -15,16 +15,16 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.security.cert;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when a {@code Certificate} has expired.
+ * <p>
+ * Note: This package is provided only for compatibility reasons. It contains a
+ * simplified version of the java.security.cert package that was previously used
+ * by JSSE (Java SSL package). All applications that do not have to be
+ * compatible with older versions of JSSE (that is before Java SDK 1.5) should
+ * only use java.security.cert.
  */
 public class CertificateExpiredException extends CertificateException {
 
@@ -34,16 +34,18 @@
     private static final long serialVersionUID = 5091601212177261883L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateExpiredException} with the specified
+     * message.
+     *
+     * @param msg
+     *            the detail message for this exception
      */
     public CertificateExpiredException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateExpiredException}.
      */
     public CertificateExpiredException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateNotYetValidException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateNotYetValidException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateNotYetValidException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateNotYetValidException.java Tue Apr 28 17:01:41 2009
@@ -15,16 +15,16 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.security.cert;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when a {@code Certificate} is not yet valid.
+ * <p>
+ * Note: This package is provided only for compatibility reasons. It contains a
+ * simplified version of the java.security.cert package that was previously used
+ * by JSSE (Java SSL package). All applications that do not have to be
+ * compatible with older versions of JSSE (that is before Java SDK 1.5) should
+ * only use java.security.cert.
  */
 public class CertificateNotYetValidException extends CertificateException {
 
@@ -34,16 +34,18 @@
     private static final long serialVersionUID = -8976172474266822818L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateNotYetValidException} with the specified
+     * message.
+     *
+     * @param msg
+     *            the detail message for the exception.
      */
     public CertificateNotYetValidException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateNotYetValidException}.
      */
     public CertificateNotYetValidException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateParsingException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateParsingException.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateParsingException.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/CertificateParsingException.java Tue Apr 28 17:01:41 2009
@@ -15,16 +15,16 @@
  *  limitations under the License.
  */
 
-/**
-* @author Vera Y. Petrashkova
-* @version $Revision$
-*/
-
 package javax.security.cert;
 
 /**
- * @com.intel.drl.spec_ref
- * 
+ * The exception that is thrown when a {@code Certificate} can not be parsed.
+ * <p>
+ * Note: This package is provided only for compatibility reasons. It contains a
+ * simplified version of the java.security.cert package that was previously used
+ * by JSSE (Java SSL package). All applications that do not have to be
+ * compatible with older versions of JSSE (that is before Java SDK 1.5) should
+ * only use java.security.cert.
  */
 public class CertificateParsingException extends CertificateException {
 
@@ -34,16 +34,18 @@
     private static final long serialVersionUID = -8449352422951136229L;
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateParsingException} with the specified
+     * message.
+     *
+     * @param msg
+     *            the detail message for the exception.
      */
     public CertificateParsingException(String msg) {
         super(msg);
     }
 
     /**
-     * @com.intel.drl.spec_ref
-     *  
+     * Creates a new {@code CertificateParsingException}.
      */
     public CertificateParsingException() {
     }

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/X509Certificate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/X509Certificate.java?rev=769463&r1=769462&r2=769463&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/X509Certificate.java (original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/javax/security/cert/X509Certificate.java Tue Apr 28 17:01:41 2009
@@ -15,11 +15,6 @@
  *  limitations under the License.
  */
 
-/**
-* @author Alexander Y. Kleymenov
-* @version $Revision$
-*/
-
 package javax.security.cert;
 
 import java.io.ByteArrayInputStream;
@@ -45,7 +40,16 @@
 import org.apache.harmony.security.internal.nls.Messages;
 
 /**
- * @com.intel.drl.spec_ref
+ * Abstract base class for X.509 certificates.
+ * <p>
+ * This represents a standard way for accessing the attributes of X.509 v1
+ * certificates.
+ * <p>
+ * Note: This package is provided only for compatibility reasons.
+ * It contains a simplified version of the java.security.cert package that was
+ * previously used by JSSE (Java SSL package). All applications that do not have
+ * to be compatible with older versions of JSSE (that is before Java SDK 1.5)
+ * should only use java.security.cert.
  */
 public abstract class X509Certificate extends Certificate {
 
@@ -68,14 +72,21 @@
     }
     
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code X509Certificate}.
      */
     public X509Certificate() {
         super();
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code X509Certificate} and initializes it from the
+     * specified input stream.
+     *
+     * @param inStream
+     *            input stream containing data to initialize the certificate.
+     * @return the certificate initialized from the specified input stream
+     * @throws CertificateException
+     *             if the certificate cannot be created or initialized.
      */
     public static final X509Certificate getInstance(InputStream inStream)
                                              throws CertificateException {
@@ -201,7 +212,14 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Creates a new {@code X509Certificate} and initializes it from the
+     * specified byte array.
+     *
+     * @param certData
+     *            byte array containing data to initialize the certificate.
+     * @return the certificate initialized from the specified byte array
+     * @throws CertificateException
+     *             if the certificate cannot be created or initialized.
      */
     public static final X509Certificate getInstance(byte[] certData)
                                              throws CertificateException {
@@ -213,60 +231,165 @@
     }
 
     /**
-     * @com.intel.drl.spec_ref
+     * Checks whether the certificate is currently valid.
+     * <p>
+     * The validity defined in ASN.1:
+     *
+     * <pre>
+     * validity             Validity
+     *
+     * Validity ::= SEQUENCE {
+     *      notBefore       CertificateValidityDate,
+     *      notAfter        CertificateValidityDate }
+     *
+     * CertificateValidityDate ::= CHOICE {
+     *      utcTime         UTCTime,
+     *      generalTime     GeneralizedTime }
+     * </pre>
+     *
+     * @throws CertificateExpiredException
+     *             if the certificate has expired.
+     * @throws CertificateNotYetValidException
+     *             if the certificate is not yet valid.
      */
     public abstract void checkValidity()
             throws CertificateExpiredException, CertificateNotYetValidException;
 
 
     /**
-     * @com.intel.drl.spec_ref
+     * Checks whether the certificate is valid at the specified date.
+     *
+     * @param date
+     *            the date to check the validity against.
+     * @throws CertificateExpiredException
+     *             if the certificate has expired.
+     * @throws CertificateNotYetValidException
+     *             if the certificate is not yet valid.
+     * @see #checkValidity()
      */
     public abstract void checkValidity(Date date)
             throws CertificateExpiredException, CertificateNotYetValidException;
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the certificates {@code version} (version number).
+     * <p>
+     * The version defined is ASN.1:
+     *
+     * <pre>
+     * Version ::=  INTEGER  {  v1(0), v2(1), v3(2)  }
+     * </pre>
+     *
+     * @return the version number.
      */
     public abstract int getVersion();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code serialNumber} of the certificate.
+     * <p>
+     * The ASN.1 definition of {@code serialNumber}:
+     *
+     * <pre>
+     * CertificateSerialNumber  ::=  INTEGER
+     * </pre>
+     *
+     * @return the serial number.
      */
     public abstract BigInteger getSerialNumber();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code issuer} (issuer distinguished name) as an
+     * implementation specific {@code Principal} object.
+     * <p>
+     * The ASN.1 definition of {@code issuer}:
+     *
+     * <pre>
+     *  issuer      Name
+     *
+     *  Name ::= CHOICE {
+     *      RDNSequence }
+     *
+     *    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+     *
+     *    RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
+     *
+     *    AttributeTypeAndValue ::= SEQUENCE {
+     *      type     AttributeType,
+     *      value    AttributeValue }
+     *
+     *    AttributeType ::= OBJECT IDENTIFIER
+     *
+     *    AttributeValue ::= ANY DEFINED BY AttributeType
+     * </pre>
+     *
+     * @return the {@code issuer} as an implementation specific {@code
+     *         Principal}.
      */
     public abstract Principal getIssuerDN();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code subject} (subject distinguished name) as an
+     * implementation specific {@code Principal} object.
+     * <p>
+     * The ASN.1 definition of {@code subject}:
+     *
+     * <pre>
+     * subject      Name
+     *
+     *  Name ::= CHOICE {
+     *      RDNSequence }
+     *
+     *    RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+     *
+     *    RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
+     *
+     *    AttributeTypeAndValue ::= SEQUENCE {
+     *      type     AttributeType,
+     *      value    AttributeValue }
+     *
+     *    AttributeType ::= OBJECT IDENTIFIER
+     *
+     *    AttributeValue ::= ANY DEFINED BY AttributeType
+     * </pre>
+     *
+     * @return the {@code subject} (subject distinguished name).
      */
     public abstract Principal getSubjectDN();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code notBefore} date from the validity period of the
+     * certificate.
+     *
+     * @return the start of the validity period.
      */
     public abstract Date getNotBefore();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the {@code notAfter} date of the validity period of the
+     * certificate.
+     *
+     * @return the end of the validity period.
      */
     public abstract Date getNotAfter();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the name of the algorithm for the certificate signature.
+     *
+     * @return the signature algorithm name.
      */
     public abstract String getSigAlgName();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the OID of the signature algorithm from the certificate.
+     *
+     * @return the OID of the signature algorithm.
      */
     public abstract String getSigAlgOID();
 
     /**
-     * @com.intel.drl.spec_ref
+     * Returns the parameters of the signature algorithm in DER-encoded format.
+     *
+     * @return the parameters of the signature algorithm, or null if none are
+     *         used.
      */
     public abstract byte[] getSigAlgParams();
 }



Mime
View raw message