Merge "java.security.spec: update classes in java.security.spec"
diff --git a/ojluni/src/main/java/java/security/spec/DSAParameterSpec.java b/ojluni/src/main/java/java/security/spec/DSAParameterSpec.java
index 2c9c546..eed6bdc 100644
--- a/ojluni/src/main/java/java/security/spec/DSAParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/DSAParameterSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -61,27 +61,27 @@
}
/**
- * Returns the prime <code>p</code>.
+ * Returns the prime {@code p}.
*
- * @return the prime <code>p</code>.
+ * @return the prime {@code p}.
*/
public BigInteger getP() {
return this.p;
}
/**
- * Returns the sub-prime <code>q</code>.
+ * Returns the sub-prime {@code q}.
*
- * @return the sub-prime <code>q</code>.
+ * @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
return this.q;
}
/**
- * Returns the base <code>g</code>.
+ * Returns the base {@code g}.
*
- * @return the base <code>g</code>.
+ * @return the base {@code g}.
*/
public BigInteger getG() {
return this.g;
diff --git a/ojluni/src/main/java/java/security/spec/DSAPrivateKeySpec.java b/ojluni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
index 44d6859..a004de7 100644
--- a/ojluni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,36 +69,36 @@
}
/**
- * Returns the private key <code>x</code>.
+ * Returns the private key {@code x}.
*
- * @return the private key <code>x</code>.
+ * @return the private key {@code x}.
*/
public BigInteger getX() {
return this.x;
}
/**
- * Returns the prime <code>p</code>.
+ * Returns the prime {@code p}.
*
- * @return the prime <code>p</code>.
+ * @return the prime {@code p}.
*/
public BigInteger getP() {
return this.p;
}
/**
- * Returns the sub-prime <code>q</code>.
+ * Returns the sub-prime {@code q}.
*
- * @return the sub-prime <code>q</code>.
+ * @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
return this.q;
}
/**
- * Returns the base <code>g</code>.
+ * Returns the base {@code g}.
*
- * @return the base <code>g</code>.
+ * @return the base {@code g}.
*/
public BigInteger getG() {
return this.g;
diff --git a/ojluni/src/main/java/java/security/spec/DSAPublicKeySpec.java b/ojluni/src/main/java/java/security/spec/DSAPublicKeySpec.java
index 2dfc738..a56e6f9 100644
--- a/ojluni/src/main/java/java/security/spec/DSAPublicKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/DSAPublicKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,36 +69,36 @@
}
/**
- * Returns the public key <code>y</code>.
+ * Returns the public key {@code y}.
*
- * @return the public key <code>y</code>.
+ * @return the public key {@code y}.
*/
public BigInteger getY() {
return this.y;
}
/**
- * Returns the prime <code>p</code>.
+ * Returns the prime {@code p}.
*
- * @return the prime <code>p</code>.
+ * @return the prime {@code p}.
*/
public BigInteger getP() {
return this.p;
}
/**
- * Returns the sub-prime <code>q</code>.
+ * Returns the sub-prime {@code q}.
*
- * @return the sub-prime <code>q</code>.
+ * @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
return this.q;
}
/**
- * Returns the base <code>g</code>.
+ * Returns the base {@code g}.
*
- * @return the base <code>g</code>.
+ * @return the base {@code g}.
*/
public BigInteger getG() {
return this.g;
diff --git a/ojluni/src/main/java/java/security/spec/ECFieldF2m.java b/ojluni/src/main/java/java/security/spec/ECFieldF2m.java
index f271ccb..4076fa6 100644
--- a/ojluni/src/main/java/java/security/spec/ECFieldF2m.java
+++ b/ojluni/src/main/java/java/security/spec/ECFieldF2m.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,9 +45,9 @@
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with normal basis.
- * @param m with 2^<code>m</code> being the number of elements.
- * @exception IllegalArgumentException if <code>m</code>
+ * field which has 2^{@code m} elements with normal basis.
+ * @param m with 2^{@code m} being the number of elements.
+ * @exception IllegalArgumentException if {@code m}
* is not positive.
*/
public ECFieldF2m(int m) {
@@ -61,24 +61,24 @@
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with
+ * field which has 2^{@code m} elements with
* polynomial basis.
* The reduction polynomial for this field is based
- * on <code>rp</code> whose i-th bit correspondes to
+ * on {@code rp} whose i-th bit corresponds to
* the i-th coefficient of the reduction polynomial.<p>
* Note: A valid reduction polynomial is either a
- * trinomial (X^<code>m</code> + X^<code>k</code> + 1
- * with <code>m</code> > <code>k</code> >= 1) or a
- * pentanomial (X^<code>m</code> + X^<code>k3</code>
- * + X^<code>k2</code> + X^<code>k1</code> + 1 with
- * <code>m</code> > <code>k3</code> > <code>k2</code>
- * > <code>k1</code> >= 1).
- * @param m with 2^<code>m</code> being the number of elements.
+ * trinomial (X^{@code m} + X^{@code k} + 1
+ * with {@code m} > {@code k} >= 1) or a
+ * pentanomial (X^{@code m} + X^{@code k3}
+ * + X^{@code k2} + X^{@code k1} + 1 with
+ * {@code m} > {@code k3} > {@code k2}
+ * > {@code k1} >= 1).
+ * @param m with 2^{@code m} being the number of elements.
* @param rp the BigInteger whose i-th bit corresponds to
* the i-th coefficient of the reduction polynomial.
- * @exception NullPointerException if <code>rp</code> is null.
- * @exception IllegalArgumentException if <code>m</code>
- * is not positive, or <code>rp</code> does not represent
+ * @exception NullPointerException if {@code rp} is null.
+ * @exception IllegalArgumentException if {@code m}
+ * is not positive, or {@code rp} does not represent
* a valid reduction polynomial.
*/
public ECFieldF2m(int m, BigInteger rp) {
@@ -106,28 +106,28 @@
/**
* Creates an elliptic curve characteristic 2 finite
- * field which has 2^<code>m</code> elements with
+ * field which has 2^{@code m} elements with
* polynomial basis. The reduction polynomial for this
- * field is based on <code>ks</code> whose content
+ * field is based on {@code ks} whose content
* contains the order of the middle term(s) of the
* reduction polynomial.
* Note: A valid reduction polynomial is either a
- * trinomial (X^<code>m</code> + X^<code>k</code> + 1
- * with <code>m</code> > <code>k</code> >= 1) or a
- * pentanomial (X^<code>m</code> + X^<code>k3</code>
- * + X^<code>k2</code> + X^<code>k1</code> + 1 with
- * <code>m</code> > <code>k3</code> > <code>k2</code>
- * > <code>k1</code> >= 1), so <code>ks</code> should
+ * trinomial (X^{@code m} + X^{@code k} + 1
+ * with {@code m} > {@code k} >= 1) or a
+ * pentanomial (X^{@code m} + X^{@code k3}
+ * + X^{@code k2} + X^{@code k1} + 1 with
+ * {@code m} > {@code k3} > {@code k2}
+ * > {@code k1} >= 1), so {@code ks} should
* have length 1 or 3.
- * @param m with 2^<code>m</code> being the number of elements.
+ * @param m with 2^{@code m} being the number of elements.
* @param ks the order of the middle term(s) of the
* reduction polynomial. Contents of this array are copied
* to protect against subsequent modification.
- * @exception NullPointerException if <code>ks</code> is null.
- * @exception IllegalArgumentException if<code>m</code>
- * is not positive, or the length of <code>ks</code>
- * is neither 1 nor 3, or values in <code>ks</code>
- * are not between <code>m</code>-1 and 1 (inclusive)
+ * @exception NullPointerException if {@code ks} is null.
+ * @exception IllegalArgumentException if{@code m}
+ * is not positive, or the length of {@code ks}
+ * is neither 1 nor 3, or values in {@code ks}
+ * are not between {@code m}-1 and 1 (inclusive)
* and in descending order.
*/
public ECFieldF2m(int m, int[] ks) {
@@ -160,7 +160,7 @@
}
/**
- * Returns the field size in bits which is <code>m</code>
+ * Returns the field size in bits which is {@code m}
* for this characteristic 2 finite field.
* @return the field size in bits.
*/
@@ -169,9 +169,9 @@
}
/**
- * Returns the value <code>m</code> of this characteristic
+ * Returns the value {@code m} of this characteristic
* 2 finite field.
- * @return <code>m</code> with 2^<code>m</code> being the
+ * @return {@code m} with 2^{@code m} being the
* number of elements.
*/
public int getM() {
@@ -211,8 +211,8 @@
* Compares this finite field for equality with the
* specified object.
* @param obj the object to be compared.
- * @return true if <code>obj</code> is an instance
- * of ECFieldF2m and both <code>m</code> and the reduction
+ * @return true if {@code obj} is an instance
+ * of ECFieldF2m and both {@code m} and the reduction
* polynomial match, false otherwise.
*/
public boolean equals(Object obj) {
diff --git a/ojluni/src/main/java/java/security/spec/ECFieldFp.java b/ojluni/src/main/java/java/security/spec/ECFieldFp.java
index 1835499..c578962 100644
--- a/ojluni/src/main/java/java/security/spec/ECFieldFp.java
+++ b/ojluni/src/main/java/java/security/spec/ECFieldFp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,10 +43,10 @@
/**
* Creates an elliptic curve prime finite field
- * with the specified prime <code>p</code>.
+ * with the specified prime {@code p}.
* @param p the prime.
- * @exception NullPointerException if <code>p</code> is null.
- * @exception IllegalArgumentException if <code>p</code>
+ * @exception NullPointerException if {@code p} is null.
+ * @exception IllegalArgumentException if {@code p}
* is not positive.
*/
public ECFieldFp(BigInteger p) {
@@ -66,7 +66,7 @@
};
/**
- * Returns the prime <code>p</code> of this prime finite field.
+ * Returns the prime {@code p} of this prime finite field.
* @return the prime.
*/
public BigInteger getP() {
@@ -77,7 +77,7 @@
* Compares this prime finite field for equality with the
* specified object.
* @param obj the object to be compared.
- * @return true if <code>obj</code> is an instance
+ * @return true if {@code obj} is an instance
* of ECFieldFp and the prime value match, false otherwise.
*/
public boolean equals(Object obj) {
diff --git a/ojluni/src/main/java/java/security/spec/ECGenParameterSpec.java b/ojluni/src/main/java/java/security/spec/ECGenParameterSpec.java
index da16945..4f3f63b 100644
--- a/ojluni/src/main/java/java/security/spec/ECGenParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/ECGenParameterSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,13 +41,13 @@
/**
* Creates a parameter specification for EC parameter
* generation using a standard (or predefined) name
- * <code>stdName</code> in order to generate the corresponding
+ * {@code stdName} in order to generate the corresponding
* (precomputed) elliptic curve domain parameters. For the
* list of supported names, please consult the documentation
* of provider whose implementation will be used.
* @param stdName the standard name of the to-be-generated EC
* domain parameters.
- * @exception NullPointerException if <code>stdName</code>
+ * @exception NullPointerException if {@code stdName}
* is null.
*/
public ECGenParameterSpec(String stdName) {
diff --git a/ojluni/src/main/java/java/security/spec/ECParameterSpec.java b/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
index 87271a3..12c90d8 100644
--- a/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/ECParameterSpec.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2014 The Android Open Source Project
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,12 +50,12 @@
* @param curve the elliptic curve which this parameter
* defines.
* @param g the generator which is also known as the base point.
- * @param n the order of the generator <code>g</code>.
+ * @param n the order of the generator {@code g}.
* @param h the cofactor.
- * @exception NullPointerException if <code>curve</code>,
- * <code>g</code>, or <code>n</code> is null.
- * @exception IllegalArgumentException if <code>n</code>
- * or <code>h</code> is not positive.
+ * @exception NullPointerException if {@code curve},
+ * {@code g}, or {@code n} is null.
+ * @exception IllegalArgumentException if {@code n}
+ * or {@code h} is not positive.
*/
public ECParameterSpec(EllipticCurve curve, ECPoint g,
BigInteger n, int h) {
diff --git a/ojluni/src/main/java/java/security/spec/ECPoint.java b/ojluni/src/main/java/java/security/spec/ECPoint.java
index 0c2ce57..1b051c7 100644
--- a/ojluni/src/main/java/java/security/spec/ECPoint.java
+++ b/ojluni/src/main/java/java/security/spec/ECPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -54,11 +54,11 @@
/**
* Creates an ECPoint from the specified affine x-coordinate
- * <code>x</code> and affine y-coordinate <code>y</code>.
+ * {@code x} and affine y-coordinate {@code y}.
* @param x the affine x-coordinate.
* @param y the affine y-coordinate.
- * @exception NullPointerException if <code>x</code> or
- * <code>y</code> is null.
+ * @exception NullPointerException if {@code x} or
+ * {@code y} is null.
*/
public ECPoint(BigInteger x, BigInteger y) {
if ((x==null) || (y==null)) {
@@ -69,7 +69,7 @@
}
/**
- * Returns the affine x-coordinate <code>x</code>.
+ * Returns the affine x-coordinate {@code x}.
* Note: POINT_INFINITY has a null affine x-coordinate.
* @return the affine x-coordinate.
*/
@@ -78,7 +78,7 @@
}
/**
- * Returns the affine y-coordinate <code>y</code>.
+ * Returns the affine y-coordinate {@code y}.
* Note: POINT_INFINITY has a null affine y-coordinate.
* @return the affine y-coordinate.
*/
@@ -90,7 +90,7 @@
* Compares this elliptic curve point for equality with
* the specified object.
* @param obj the object to be compared.
- * @return true if <code>obj</code> is an instance of
+ * @return true if {@code obj} is an instance of
* ECPoint and the affine coordinates match, false otherwise.
*/
public boolean equals(Object obj) {
diff --git a/ojluni/src/main/java/java/security/spec/ECPrivateKeySpec.java b/ojluni/src/main/java/java/security/spec/ECPrivateKeySpec.java
index c8e2c40..7f03cfd 100644
--- a/ojluni/src/main/java/java/security/spec/ECPrivateKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/ECPrivateKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,8 @@
* @param s the private value.
* @param params the associated elliptic curve domain
* parameters.
- * @exception NullPointerException if <code>s</code>
- * or <code>params</code> is null.
+ * @exception NullPointerException if {@code s}
+ * or {@code params} is null.
*/
public ECPrivateKeySpec(BigInteger s, ECParameterSpec params) {
if (s == null) {
diff --git a/ojluni/src/main/java/java/security/spec/ECPublicKeySpec.java b/ojluni/src/main/java/java/security/spec/ECPublicKeySpec.java
index 2d8b510..e0cfb77 100644
--- a/ojluni/src/main/java/java/security/spec/ECPublicKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/ECPublicKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,9 +47,9 @@
* @param w the public point.
* @param params the associated elliptic curve domain
* parameters.
- * @exception NullPointerException if <code>w</code>
- * or <code>params</code> is null.
- * @exception IllegalArgumentException if <code>w</code>
+ * @exception NullPointerException if {@code w}
+ * or {@code params} is null.
+ * @exception IllegalArgumentException if {@code w}
* is point at infinity, i.e. ECPoint.POINT_INFINITY
*/
public ECPublicKeySpec(ECPoint w, ECParameterSpec params) {
diff --git a/ojluni/src/main/java/java/security/spec/EllipticCurve.java b/ojluni/src/main/java/java/security/spec/EllipticCurve.java
index a270ee7..8ec97b0 100644
--- a/ojluni/src/main/java/java/security/spec/EllipticCurve.java
+++ b/ojluni/src/main/java/java/security/spec/EllipticCurve.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -68,15 +68,15 @@
/**
* Creates an elliptic curve with the specified elliptic field
- * <code>field</code> and the coefficients <code>a</code> and
- * <code>b</code>.
+ * {@code field} and the coefficients {@code a} and
+ * {@code b}.
* @param field the finite field that this elliptic curve is over.
* @param a the first coefficient of this elliptic curve.
* @param b the second coefficient of this elliptic curve.
- * @exception NullPointerException if <code>field</code>,
- * <code>a</code>, or <code>b</code> is null.
- * @exception IllegalArgumentException if <code>a</code>
- * or <code>b</code> is not null and not in <code>field</code>.
+ * @exception NullPointerException if {@code field},
+ * {@code a}, or {@code b} is null.
+ * @exception IllegalArgumentException if {@code a}
+ * or {@code b} is not null and not in {@code field}.
*/
public EllipticCurve(ECField field, BigInteger a,
BigInteger b) {
@@ -85,18 +85,18 @@
/**
* Creates an elliptic curve with the specified elliptic field
- * <code>field</code>, the coefficients <code>a</code> and
- * <code>b</code>, and the <code>seed</code> used for curve generation.
+ * {@code field}, the coefficients {@code a} and
+ * {@code b}, and the {@code seed} used for curve generation.
* @param field the finite field that this elliptic curve is over.
* @param a the first coefficient of this elliptic curve.
* @param b the second coefficient of this elliptic curve.
* @param seed the bytes used during curve generation for later
* validation. Contents of this array are copied to protect against
* subsequent modification.
- * @exception NullPointerException if <code>field</code>,
- * <code>a</code>, or <code>b</code> is null.
- * @exception IllegalArgumentException if <code>a</code>
- * or <code>b</code> is not null and not in <code>field</code>.
+ * @exception NullPointerException if {@code field},
+ * {@code a}, or {@code b} is null.
+ * @exception IllegalArgumentException if {@code a}
+ * or {@code b} is not null and not in {@code field}.
*/
public EllipticCurve(ECField field, BigInteger a,
BigInteger b, byte[] seed) {
@@ -122,9 +122,9 @@
}
/**
- * Returns the finite field <code>field</code> that this
+ * Returns the finite field {@code field} that this
* elliptic curve is over.
- * @return the field <code>field</code> that this curve
+ * @return the field {@code field} that this curve
* is over.
*/
public ECField getField() {
@@ -132,27 +132,27 @@
}
/**
- * Returns the first coefficient <code>a</code> of the
+ * Returns the first coefficient {@code a} of the
* elliptic curve.
- * @return the first coefficient <code>a</code>.
+ * @return the first coefficient {@code a}.
*/
public BigInteger getA() {
return a;
}
/**
- * Returns the second coefficient <code>b</code> of the
+ * Returns the second coefficient {@code b} of the
* elliptic curve.
- * @return the second coefficient <code>b</code>.
+ * @return the second coefficient {@code b}.
*/
public BigInteger getB() {
return b;
}
/**
- * Returns the seeding bytes <code>seed</code> used
+ * Returns the seeding bytes {@code seed} used
* during curve generation. May be null if not specified.
- * @return the seeding bytes <code>seed</code>. A new
+ * @return the seeding bytes {@code seed}. A new
* array is returned each time this method is called.
*/
public byte[] getSeed() {
@@ -164,7 +164,7 @@
* Compares this elliptic curve for equality with the
* specified object.
* @param obj the object to be compared.
- * @return true if <code>obj</code> is an instance of
+ * @return true if {@code obj} is an instance of
* EllipticCurve and the field, A, and B match, false otherwise.
*/
public boolean equals(Object obj) {
@@ -184,9 +184,9 @@
* Returns a hash code value for this elliptic curve.
* @return a hash code value computed from the hash codes of the field, A,
* and B, as follows:
- * <code>
+ * <pre>{@code
* (field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2)
- * </code>
+ * }</pre>
*/
public int hashCode() {
return (field.hashCode() << 6 +
diff --git a/ojluni/src/main/java/java/security/spec/EncodedKeySpec.java b/ojluni/src/main/java/java/security/spec/EncodedKeySpec.java
index b587819..cc3b81e 100644
--- a/ojluni/src/main/java/java/security/spec/EncodedKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/EncodedKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
*
* @param encodedKey the encoded key. The contents of the
* array are copied to protect against subsequent modification.
- * @exception NullPointerException if <code>encodedKey</code>
+ * @exception NullPointerException if {@code encodedKey}
* is null.
*/
public EncodedKeySpec(byte[] encodedKey) {
@@ -74,9 +74,9 @@
* (see {@link java.security.Key Key}) can be transformed
* (see {@link java.security.KeyFactory KeyFactory})
* into this key specification (or a subclass of it),
- * <code>getFormat</code> called
+ * {@code getFormat} called
* on the opaque key returns the same value as the
- * <code>getFormat</code> method
+ * {@code getFormat} method
* of this key specification.
*
* @return a string representation of the encoding format.
diff --git a/ojluni/src/main/java/java/security/spec/InvalidKeySpecException.java b/ojluni/src/main/java/java/security/spec/InvalidKeySpecException.java
index 670913d..4655c4a 100644
--- a/ojluni/src/main/java/java/security/spec/InvalidKeySpecException.java
+++ b/ojluni/src/main/java/java/security/spec/InvalidKeySpecException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -63,13 +63,13 @@
}
/**
- * Creates a <code>InvalidKeySpecException</code> with the specified
+ * Creates a {@code InvalidKeySpecException} with the specified
* detail message and cause.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
+ * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
@@ -78,13 +78,13 @@
}
/**
- * Creates a <code>InvalidKeySpecException</code> with the specified cause
- * and a detail message of <tt>(cause==null ? null : cause.toString())</tt>
+ * Creates a {@code InvalidKeySpecException} with the specified cause
+ * and a detail message of {@code (cause==null ? null : cause.toString())}
* (which typically contains the class and detail message of
- * <tt>cause</tt>).
+ * {@code cause}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A <tt>null</tt> value is permitted,
+ * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
diff --git a/ojluni/src/main/java/java/security/spec/KeySpec.java b/ojluni/src/main/java/java/security/spec/KeySpec.java
index 26c9777..34fec5d 100644
--- a/ojluni/src/main/java/java/security/spec/KeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/KeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
* <P> A key may be specified in an algorithm-specific way, or in an
* algorithm-independent encoding format (such as ASN.1).
* For example, a DSA private key may be specified by its components
- * <code>x</code>, <code>p</code>, <code>q</code>, and <code>g</code>
+ * {@code x}, {@code p}, {@code q}, and {@code g}
* (see {@link DSAPrivateKeySpec}), or it may be
* specified using its DER encoding
* (see {@link PKCS8EncodedKeySpec}).
diff --git a/ojluni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java b/ojluni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
index b6dabad..060f266 100644
--- a/ojluni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
/**
* This class represents the ASN.1 encoding of a private key,
- * encoded according to the ASN.1 type <code>PrivateKeyInfo</code>.
- * The <code>PrivateKeyInfo</code> syntax is defined in the PKCS#8 standard
+ * encoded according to the ASN.1 type {@code PrivateKeyInfo}.
+ * The {@code PrivateKeyInfo} syntax is defined in the PKCS#8 standard
* as follows:
*
* <pre>
@@ -67,7 +67,7 @@
* @param encodedKey the key, which is assumed to be
* encoded according to the PKCS #8 standard. The contents of
* the array are copied to protect against subsequent modification.
- * @exception NullPointerException if <code>encodedKey</code>
+ * @exception NullPointerException if {@code encodedKey}
* is null.
*/
public PKCS8EncodedKeySpec(byte[] encodedKey) {
@@ -88,7 +88,7 @@
* Returns the name of the encoding format associated with this
* key specification.
*
- * @return the string <code>"PKCS#8"</code>.
+ * @return the string {@code "PKCS#8"}.
*/
public final String getFormat() {
return "PKCS#8";
diff --git a/ojluni/src/main/java/java/security/spec/PSSParameterSpec.java b/ojluni/src/main/java/java/security/spec/PSSParameterSpec.java
index e9f29b5..a9b82d8 100644
--- a/ojluni/src/main/java/java/security/spec/PSSParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/PSSParameterSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,7 @@
* <pre>
* OAEP-PSSDigestAlgorithms ALGORITHM-IDENTIFIER ::= {
* { OID id-sha1 PARAMETERS NULL }|
+ * { OID id-sha224 PARAMETERS NULL }|
* { OID id-sha256 PARAMETERS NULL }|
* { OID id-sha384 PARAMETERS NULL }|
* { OID id-sha512 PARAMETERS NULL },
@@ -90,14 +91,14 @@
public static final PSSParameterSpec DEFAULT = new PSSParameterSpec();
/**
- * Constructs a new <code>PSSParameterSpec</code> as defined in
+ * Constructs a new {@code PSSParameterSpec} as defined in
* the PKCS #1 standard using the default values.
*/
private PSSParameterSpec() {
}
/**
- * Creates a new <code>PSSParameterSpec</code> as defined in
+ * Creates a new {@code PSSParameterSpec} as defined in
* the PKCS #1 standard using the specified message digest,
* mask generation function, parameters for mask generation
* function, salt length, and trailer field values.
@@ -110,10 +111,10 @@
* getMGFParameters().
* @param saltLen the length of salt.
* @param trailerField the value of the trailer field.
- * @exception NullPointerException if <code>mdName</code>,
- * or <code>mgfName</code> is null.
- * @exception IllegalArgumentException if <code>saltLen</code>
- * or <code>trailerField</code> is less than 0.
+ * @exception NullPointerException if {@code mdName},
+ * or {@code mgfName} is null.
+ * @exception IllegalArgumentException if {@code saltLen}
+ * or {@code trailerField} is less than 0.
* @since 1.5
*/
public PSSParameterSpec(String mdName, String mgfName,
@@ -142,13 +143,13 @@
}
/**
- * Creates a new <code>PSSParameterSpec</code>
+ * Creates a new {@code PSSParameterSpec}
* using the specified salt length and other default values as
* defined in PKCS#1.
*
* @param saltLen the length of salt in bits to be used in PKCS#1
* PSS encoding.
- * @exception IllegalArgumentException if <code>saltLen</code> is
+ * @exception IllegalArgumentException if {@code saltLen} is
* less than 0.
*/
public PSSParameterSpec(int saltLen) {
diff --git a/ojluni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java b/ojluni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
index e9a10fa..a73c6cd 100644
--- a/ojluni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
+++ b/ojluni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@
public static final BigInteger F4 = BigInteger.valueOf(65537);
/**
- * Constructs a new <code>RSAParameterSpec</code> object from the
+ * Constructs a new {@code RSAParameterSpec} object from the
* given keysize and public-exponent value.
*
* @param keysize the modulus size (specified in number of bits)
diff --git a/ojluni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java b/ojluni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
index 97346d6..a198e43 100644
--- a/ojluni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,12 +57,12 @@
private final RSAOtherPrimeInfo otherPrimeInfo[];
/**
- * Creates a new <code>RSAMultiPrimePrivateCrtKeySpec</code>
+ * Creates a new {@code RSAMultiPrimePrivateCrtKeySpec}
* given the modulus, publicExponent, privateExponent,
* primeP, primeQ, primeExponentP, primeExponentQ,
* crtCoefficient, and otherPrimeInfo as defined in PKCS#1 v2.1.
*
- * <p>Note that the contents of <code>otherPrimeInfo</code>
+ * <p>Note that the contents of {@code otherPrimeInfo}
* are copied to protect against subsequent modification when
* constructing this object.
*
@@ -78,13 +78,13 @@
* @param otherPrimeInfo triplets of the rest of primes, null can be
* specified if there are only two prime factors (p and q).
* @exception NullPointerException if any of the parameters, i.e.
- * <code>modulus</code>,
- * <code>publicExponent</code>, <code>privateExponent</code>,
- * <code>primeP</code>, <code>primeQ</code>,
- * <code>primeExponentP</code>, <code>primeExponentQ</code>,
- * <code>crtCoefficient</code>, is null.
+ * {@code modulus},
+ * {@code publicExponent}, {@code privateExponent},
+ * {@code primeP}, {@code primeQ},
+ * {@code primeExponentP}, {@code primeExponentQ},
+ * {@code crtCoefficient}, is null.
* @exception IllegalArgumentException if an empty, i.e. 0-length,
- * <code>otherPrimeInfo</code> is specified.
+ * {@code otherPrimeInfo} is specified.
*/
public RSAMultiPrimePrivateCrtKeySpec(BigInteger modulus,
BigInteger publicExponent,
diff --git a/ojluni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java b/ojluni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
index e088915..10d8471 100644
--- a/ojluni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
+++ b/ojluni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
/**
- * Creates a new <code>RSAOtherPrimeInfo</code>
+ * Creates a new {@code RSAOtherPrimeInfo}
* given the prime, primeExponent, and
* crtCoefficient as defined in PKCS#1.
*
@@ -67,8 +67,8 @@
* @param crtCoefficient the Chinese Remainder Theorem
* coefficient.
* @exception NullPointerException if any of the parameters, i.e.
- * <code>prime</code>, <code>primeExponent</code>,
- * <code>crtCoefficient</code>, is null.
+ * {@code prime}, {@code primeExponent},
+ * {@code crtCoefficient}, is null.
*
*/
public RSAOtherPrimeInfo(BigInteger prime,
diff --git a/ojluni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java b/ojluni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
index c8d8faa..d0ba70b 100644
--- a/ojluni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@
/**
- * Creates a new <code>RSAPrivateCrtKeySpec</code>
+ * Creates a new {@code RSAPrivateCrtKeySpec}
* given the modulus, publicExponent, privateExponent,
* primeP, primeQ, primeExponentP, primeExponentQ, and
* crtCoefficient as defined in PKCS#1.
diff --git a/ojluni/src/main/java/java/security/spec/X509EncodedKeySpec.java b/ojluni/src/main/java/java/security/spec/X509EncodedKeySpec.java
index 7dd3d7b..b9984de 100644
--- a/ojluni/src/main/java/java/security/spec/X509EncodedKeySpec.java
+++ b/ojluni/src/main/java/java/security/spec/X509EncodedKeySpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
/**
* This class represents the ASN.1 encoding of a public key,
- * encoded according to the ASN.1 type <code>SubjectPublicKeyInfo</code>.
- * The <code>SubjectPublicKeyInfo</code> syntax is defined in the X.509
+ * encoded according to the ASN.1 type {@code SubjectPublicKeyInfo}.
+ * The {@code SubjectPublicKeyInfo} syntax is defined in the X.509
* standard as follows:
*
* <pre>
@@ -57,7 +57,7 @@
* @param encodedKey the key, which is assumed to be
* encoded according to the X.509 standard. The contents of the
* array are copied to protect against subsequent modification.
- * @exception NullPointerException if <code>encodedKey</code>
+ * @exception NullPointerException if {@code encodedKey}
* is null.
*/
public X509EncodedKeySpec(byte[] encodedKey) {
@@ -78,7 +78,7 @@
* Returns the name of the encoding format associated with this
* key specification.
*
- * @return the string <code>"X.509"</code>.
+ * @return the string {@code "X.509"}.
*/
public final String getFormat() {
return "X.509";
diff --git a/ojluni/src/main/java/java/security/spec/package-info.java b/ojluni/src/main/java/java/security/spec/package-info.java
new file mode 100644
index 0000000..92f30be
--- /dev/null
+++ b/ojluni/src/main/java/java/security/spec/package-info.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides classes and interfaces for key specifications and algorithm
+ * parameter specifications.
+ *
+ * <p>A key specification is a transparent representation of the key material
+ * that constitutes a key. A key may be specified in an algorithm-specific
+ * way, or in an algorithm-independent encoding format (such as ASN.1).
+ * This package contains key specifications for DSA public and private keys,
+ * RSA public and private keys, PKCS #8 private keys in DER-encoded format,
+ * and X.509 public and private keys in DER-encoded format.
+ *
+ * <p>An algorithm parameter specification is a transparent representation
+ * of the sets of parameters used with an algorithm. This package contains
+ * an algorithm parameter specification for parameters used with the
+ * DSA algorithm.
+ *
+ * <h2>Package Specification</h2>
+ *
+ * <ul>
+ * <li>PKCS #1: RSA Encryption Standard, Version 1.5, November 1993</li>
+ * <li>PKCS #8: Private-Key Information Syntax Standard,
+ * Version 1.2, November 1993</li>
+ * <li>Federal Information Processing Standards Publication (FIPS PUB) 186:
+ * Digital Signature Standard (DSS)</li>
+ * </ul>
+ *
+ * <h2>Related Documentation</h2>
+ *
+ * For documentation that includes information about algorithm parameter
+ * and key specifications, please see:
+ * <ul>
+ * <li>
+ * <a href=
+ * "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/crypto/CryptoSpec.html">
+ * <b>Java™
+ * Cryptography Architecture API Specification and Reference
+ * </b></a></li>
+ * <li>
+ * <a href=
+ * "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/crypto/HowToImplAProvider.html">
+ * <b>How to Implement a Provider for the
+ * Java™ Cryptography Architecture
+ * </b></a></li>
+ * </ul>
+ *
+ * @since 1.2
+ */
+package java.security.spec;
diff --git a/openjdk_java_files.mk b/openjdk_java_files.mk
index 10d362b..a8a66b2 100644
--- a/openjdk_java_files.mk
+++ b/openjdk_java_files.mk
@@ -661,6 +661,7 @@
ojluni/src/main/java/java/security/spec/RSAPrivateKeySpec.java \
ojluni/src/main/java/java/security/spec/RSAPublicKeySpec.java \
ojluni/src/main/java/java/security/spec/X509EncodedKeySpec.java \
+ ojluni/src/main/java/java/security/spec/package-info.java \
ojluni/src/main/java/java/security/Timestamp.java \
ojluni/src/main/java/java/security/UnrecoverableEntryException.java \
ojluni/src/main/java/java/security/UnrecoverableKeyException.java \