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


Definition at line 34 of file JCODHPublicKey.java.
Public Member Functions | |
| JCODHPublicKey (String str) throws JCOFault | |
| JCODHPublicKey (byte[] bytes) throws JCOFault | |
| byte[] | encryptBytes (byte[] inputBytes) throws JCOFault |
| byte[] | decryptBytes (byte[] inputBytes) throws JCOFault |
| final BigInteger | getY () |
| final String | getAlgorithm () |
| final String | getFormat () |
| byte[] | getEncoded () |
| JCOEncodedBytes | encode () |
| Object | verify (JCOSignedBytes signedObject) throws JCOSignatureFault, JCOFault |
| final AsymmetricKeyParameter | getParameters () |
Package Functions | |
| JCODHPublicKey (DHPublicKeyParameters key) | |
|
|
Construct an encoded representation of this object suitable for disk storage. Implements edu.virtualschool.jco.JCOKey. Definition at line 280 of file JCODHPublicKey.java. References edu.virtualschool.jco.unfinished.JCODHPublicKey.getEncoded().
00281 {
00282 return new JCOEncodedBytes(getEncoded());
00283 }
|
|
|
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 254 of file JCODHPublicKey.java.
00255 {
00256 return "DH";
00257 }
|
|
|
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 262 of file JCODHPublicKey.java. Referenced by edu.virtualschool.jco.unfinished.JCODHPublicKey.encode().
00263 {
00264 ByteArrayOutputStream bOut = new ByteArrayOutputStream();
00265 DEROutputStream dOut = new DEROutputStream(bOut);
00266 DHParameter dhp = new DHParameter(params.getP(), params.getG(), 0);
00267 AlgorithmIdentifier aid = new AlgorithmIdentifier(X9ObjectIdentifiers.dhpublicnumber, dhp.getDERObject());
00268 SubjectPublicKeyInfo info = new SubjectPublicKeyInfo(aid, new DERInteger(y));
00269 try
00270 {
00271 dOut.writeObject(info);
00272 dOut.close();
00273 return bOut.toByteArray();
00274 }
00275 catch (IOException e)
00276 {
00277 throw new RuntimeFault(e, e);
00278 }
00279 }
|
|
|
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 258 of file JCODHPublicKey.java.
00259 {
00260 return "X.509";
00261 }
|