Inheritance diagram for edu.virtualschool.jco.unfinished.JCODHPrivateKey:


JCODHAsymmetricKey
Definition at line 33 of file JCODHPrivateKey.java.
Public Member Functions | |
| JCOEncodedBytes | encode () |
| JCOSignedBytes | sign (Serializable object) throws JCOFault |
| byte[] | encryptBytes (byte[] inputBytes) throws JCOFault |
| byte[] | decryptBytes (byte[] inputBytes) throws JCOFault |
| DHParameters | getParams () |
| BigInteger | getX () |
| final String | getAlgorithm () |
| String | getFormat () |
| byte[] | getEncoded () |
| final AsymmetricKeyParameter | getParameters () |
Package Functions | |
| JCODHPrivateKey (DHPrivateKeyParameters key) | |
|
|
Construct an encoded representation of this object suitable for disk storage. Implements edu.virtualschool.jco.JCOKey. Definition at line 79 of file JCODHPrivateKey.java. References edu.virtualschool.jco.unfinished.JCODHPrivateKey.getEncoded().
00080 {
00081 return new JCOEncodedBytes(getEncoded());
00082 }
|
|
|
Returns the standard algorithm name for this key. For example, "DSA" would indicate that this key is a DSA key. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Implements edu.virtualschool.jco.JCOKey. Definition at line 131 of file JCODHPrivateKey.java.
00132 {
00133 return "DH";
00134 }
|
|
|
Returns the key in its primary encoding format, or null if this key does not support encoding.
Implements edu.virtualschool.jco.JCOKey. Definition at line 139 of file JCODHPrivateKey.java. Referenced by edu.virtualschool.jco.unfinished.JCODHPrivateKey.encode().
00140 {
00141 ByteArrayOutputStream bOut = new ByteArrayOutputStream();
00142 DEROutputStream dOut = new DEROutputStream(bOut);
00143 DHParameter dhp = new DHParameter(params.getP(), params.getG(), 0);
00144 AlgorithmIdentifier aid = new AlgorithmIdentifier(PKCSObjectIdentifiers.dhKeyAgreement, dhp.getDERObject());
00145 PrivateKeyInfo info = new PrivateKeyInfo(aid, new DERInteger(getX()));
00146 try
00147 {
00148 dOut.writeObject(info);
00149 dOut.close();
00150 return bOut.toByteArray();
00151 }
00152 catch (IOException e)
00153 {
00154 throw new RuntimeFault(e, e);
00155 }
00156 }
|
|
|
Returns the name of the primary encoding format of this key, or null if this key does not support encoding. The primary encoding format is named in terms of the appropriate ASN.1 data format, if an ASN.1 specification for this key exists. For example, the name of the ASN.1 data format for public keys is SubjectPublicKeyInfo, as defined by the X.509 standard; in this case, the returned format is
Implements edu.virtualschool.jco.JCOKey. Definition at line 135 of file JCODHPrivateKey.java.
00136 {
00137 return "PKCS#8";
00138 }
|