|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.crypto.key.OutgoingMessage
An implementation of outgoing messages for use with key agreement protocols.
Constructor Summary | |
OutgoingMessage()
|
Method Summary | |
byte[] |
toByteArray()
Returns the encoded form of the current message including the 4-byte length header. |
byte[] |
wrap()
Returns the encoded form of the current message excluding the 4-byte length header. |
void |
writeMPI(java.math.BigInteger val)
Encodes an MPI into the message. |
void |
writePrivateKey(java.security.PrivateKey k)
Encodes a private key into the message. |
void |
writePublicKey(java.security.PublicKey k)
Encodes a public key into the message. |
void |
writeString(java.lang.String s)
Encodes a string into the message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutgoingMessage()
Method Detail |
public byte[] toByteArray() throws KeyAgreementException
Returns the encoded form of the current message including the 4-byte length header.
KeyAgreementException
- if an encoding size constraint is violated.public byte[] wrap() throws KeyAgreementException
Returns the encoded form of the current message excluding the 4-byte length header.
KeyAgreementException
- if an encoding size constraint is violated.public void writePublicKey(java.security.PublicKey k) throws KeyAgreementException
Encodes a public key into the message.
k
- the public key to encode.
KeyAgreementException
- if an encoding size constraint is violated.public void writePrivateKey(java.security.PrivateKey k) throws KeyAgreementException
Encodes a private key into the message.
k
- the private key to encode.
KeyAgreementException
- if an encoding size constraint is violated.public void writeMPI(java.math.BigInteger val) throws KeyAgreementException
Encodes an MPI into the message.
val
- the MPI to encode.
KeyAgreementException
- if an encoding size constraint is violated.public void writeString(java.lang.String s) throws KeyAgreementException
Encodes a string into the message.
s
- the string to encode.
KeyAgreementException
- if the UTF8 encoding is not supported on
this platform, or if an encoding size constraint is violated.
|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |