gnu.crypto.key
Class OutgoingMessage
public class OutgoingMessage
An implementation of outgoing messages for use with key agreement
protocols.
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(BigInteger val)- Encodes an MPI into the message.
|
void | writePrivateKey(PrivateKey k)- Encodes a private key into the message.
|
void | writePublicKey(PublicKey k)- Encodes a public key into the message.
|
void | writeString(String s)- Encodes a string into the message.
|
OutgoingMessage
public OutgoingMessage()
toByteArray
public byte[] toByteArray()
throws KeyAgreementException Returns the encoded form of the current message including the 4-byte
length header.
wrap
public byte[] wrap()
throws KeyAgreementException Returns the encoded form of the current message excluding the 4-byte
length header.
writeMPI
public void writeMPI(BigInteger val)
throws KeyAgreementException Encodes an MPI into the message.
writePrivateKey
public void writePrivateKey(PrivateKey k)
throws KeyAgreementException Encodes a private key into the message.
k - the private key to encode.
writePublicKey
public void writePublicKey(PublicKey k)
throws KeyAgreementException Encodes a public key into the message.
k - the public key to encode.
writeString
public void writeString(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.
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.