summaryrefslogtreecommitdiffstats
path: root/luni/src/main
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2014-05-27 19:10:39 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-27 19:10:39 +0000
commitec629db86302432d8f731d17f67f2e48e879e220 (patch)
tree468e36cf793f01e8b46f2c0234e32aa19071ece9 /luni/src/main
parentb2f81a7d7fc0d01a5de5e24336187491c4f750ac (diff)
parent4fee9a24b51650342aa85aab8c995e1107601e7a (diff)
downloadlibcore-ec629db86302432d8f731d17f67f2e48e879e220.zip
libcore-ec629db86302432d8f731d17f67f2e48e879e220.tar.gz
libcore-ec629db86302432d8f731d17f67f2e48e879e220.tar.bz2
am 4fee9a24: Merge "ECParameterSpec: move curve selection to non-final"
* commit '4fee9a24b51650342aa85aab8c995e1107601e7a': ECParameterSpec: move curve selection to non-final
Diffstat (limited to 'luni/src/main')
-rw-r--r--luni/src/main/java/java/security/spec/ECParameterSpec.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/luni/src/main/java/java/security/spec/ECParameterSpec.java b/luni/src/main/java/java/security/spec/ECParameterSpec.java
index 9860ac0..37b39ac 100644
--- a/luni/src/main/java/java/security/spec/ECParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/ECParameterSpec.java
@@ -32,7 +32,7 @@ public class ECParameterSpec implements AlgorithmParameterSpec {
// Cofactor
private final int cofactor;
// Name of curve if available.
- private final String curveName;
+ private String curveName;
/**
* Creates a new {@code ECParameterSpec} with the specified elliptic curve,
@@ -52,23 +52,10 @@ public class ECParameterSpec implements AlgorithmParameterSpec {
*/
public ECParameterSpec(EllipticCurve curve, ECPoint generator,
BigInteger order, int cofactor) {
- this(curve, generator, order, cofactor, null);
- }
-
- /**
- * Creates a new {@code ECParameterSpec} with the specified named curve
- * and all of its parameters.
- *
- * @see #ECParameterSpec(EllipticCurve, ECPoint, BigInteger, int)
- * @hide
- */
- public ECParameterSpec(EllipticCurve curve, ECPoint generator,
- BigInteger order, int cofactor, String curveName) {
this.curve = curve;
this.generator = generator;
this.order = order;
this.cofactor = cofactor;
- this.curveName = curveName;
// throw NullPointerException if curve, generator or order is null
if (this.curve == null) {
throw new NullPointerException("curve == null");
@@ -125,6 +112,15 @@ public class ECParameterSpec implements AlgorithmParameterSpec {
}
/**
+ * Used to set the curve name if available.
+ *
+ * @hide
+ */
+ public void setCurveName(String curveName) {
+ this.curveName = curveName;
+ }
+
+ /**
* Returns the name of the curve if this is a named curve. Returns
* {@code null} if this is not known to be a named curve.
*