summaryrefslogtreecommitdiff
path: root/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
diff options
context:
space:
mode:
authorRaif S. Naffah <raif@swiftdsl.com.au>2006-06-20 11:24:41 +0000
committerRaif S. Naffah <raif@swiftdsl.com.au>2006-06-20 11:24:41 +0000
commitc2396fba423be31a4de8db3dbe09d42a04db32dc (patch)
tree09a4cc2b18491b62d6d60663b6b82e1f76856234 /gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
parent4d800c50a7257f4febca55b7c94b0901e816916a (diff)
downloadclasspath-c2396fba423be31a4de8db3dbe09d42a04db32dc.tar.gz
2006-06-20 Raif S. Naffah <raif@swiftdsl.com.au>
* gnu/java/security/key/dss/DSSKey.java: Source formatting. * gnu/java/security/key/dss/DSSKeyPairGenerator.java: Likewise. * gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java: Likewise. * gnu/java/security/key/dss/DSSKeyPairRawCodec.java: Likewise. * gnu/java/security/key/dss/DSSKeyPairX509Codec.java: Likewise. * gnu/java/security/key/dss/DSSPrivateKey.java: Likewise. * gnu/java/security/key/dss/DSSPublicKey.java: Likewise. * gnu/java/security/key/dss/FIPS186.java: Likewise. * gnu/java/security/key/rsa/GnuRSAKey.java: Likewise. * gnu/java/security/key/rsa/GnuRSAPrivateKey.java: Likewise. * gnu/java/security/key/rsa/GnuRSAPublicKey.java: Likewise. * gnu/java/security/key/rsa/RSAKeyPairGenerator.java: Likewise. * gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java: Likewise. * gnu/java/security/key/rsa/RSAKeyPairRawCodec.java: Likewise. * gnu/java/security/key/rsa/RSAKeyPairX509Codec.java: Likewise. * gnu/java/security/key/IKeyPairCodec.java: Likewise. * gnu/java/security/key/IKeyPairGenerator.java: Likewise. * gnu/java/security/key/KeyPairCodecFactory.java: Likewise. * gnu/java/security/key/KeyPairGeneratorFactory.java: Likewise.
Diffstat (limited to 'gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java')
-rw-r--r--gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java b/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
index 14a0a063c..fe92d1af4 100644
--- a/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
+++ b/gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java
@@ -85,7 +85,6 @@ public class RSAKeyPairPKCS8Codec
/**
* Returns the PKCS#8 ASN.1 <i>PrivateKeyInfo</i> representation of an RSA
* private key. The ASN.1 specification is as follows:
- *
* <pre>
* PrivateKeyInfo ::= SEQUENCE {
* version INTEGER, -- MUST be 0
@@ -98,10 +97,9 @@ public class RSAKeyPairPKCS8Codec
* parameters ANY DEFINED BY algorithm OPTIONAL
* }
* </pre>
- *
- * <p>The <i>privateKey</i> field, which is an OCTET STRING, contains the
- * DER-encoded form of the RSA private key defined as:</p>
- *
+ * <p>
+ * The <i>privateKey</i> field, which is an OCTET STRING, contains the
+ * DER-encoded form of the RSA private key defined as:
* <pre>
* RSAPrivateKey ::= SEQUENCE {
* version INTEGER, -- MUST be 0
@@ -125,7 +123,6 @@ public class RSAKeyPairPKCS8Codec
{
if (Configuration.DEBUG)
log.entering(this.getClass().getName(), "encodePrivateKey()", key);
-
if (! (key instanceof GnuRSAPrivateKey))
throw new InvalidParameterException("Wrong key type");
@@ -217,7 +214,6 @@ public class RSAKeyPairPKCS8Codec
{
if (Configuration.DEBUG)
log.entering(this.getClass().getName(), "decodePrivateKey()", input);
-
if (input == null)
throw new InvalidParameterException("Input bytes MUST NOT be null");
@@ -287,9 +283,8 @@ public class RSAKeyPairPKCS8Codec
y.initCause(x);
throw y;
}
-
- PrivateKey result = new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID, n, e,
- d, p, q, dP, dQ, qInv);
+ PrivateKey result = new GnuRSAPrivateKey(Registry.PKCS8_ENCODING_ID,
+ n, e, d, p, q, dP, dQ, qInv);
if (Configuration.DEBUG)
log.exiting(this.getClass().getName(), "decodePrivateKey()", result);
return result;