org.ka2ddo.ax25
Interface SignableMessage

All Known Subinterfaces:
AprsSignableMessage
All Known Implementing Classes:
MessageMessage

public interface SignableMessage

This interface tags messages that can be cryptographically signed (HMAC) to provide authentication and data integrity checking of those messages.


Nested Class Summary
static class SignableMessage.SignatureState
          State of signature validation.
 
Method Summary
 java.lang.String getKeyAlias()
          Get the alias for the key that should be used to sign this message at transmission time.
 java.lang.String getOriginatingCallsign()
          Get the callsign of the station that originated this message (not of any Tx-Igate relay).
 SignableMessage.SignatureState getSignatureState()
          Report the status of the signature of this message.
 long getTimestamp()
          Get the timestamp associated with this Message in milliseconds since 1 Jan 1970 UTC.
 void setKeyAlias(java.lang.String alias)
          Set the alias for the key that should be used to sign this message at transmission time.
 void writeToSigningBuf(java.io.DataOutput dos, java.io.PrintStream ps)
          Write the appropriate part of the body of this message to the signing buffer.
 

Method Detail

getSignatureState

SignableMessage.SignatureState getSignatureState()
Report the status of the signature of this message.

Returns:
signature state of this message

setKeyAlias

void setKeyAlias(java.lang.String alias)
Set the alias for the key that should be used to sign this message at transmission time.

Parameters:
alias - String name that should match a secret key in the key manager

getKeyAlias

java.lang.String getKeyAlias()
Get the alias for the key that should be used to sign this message at transmission time.

Returns:
String name of key alias, matching a secret key in the key manager, or null if message should not be signed

getTimestamp

long getTimestamp()
Get the timestamp associated with this Message in milliseconds since 1 Jan 1970 UTC.

Returns:
time message was received or the timestamp in the message, or -1 if this is a permanent (non-timing-out message)

getOriginatingCallsign

java.lang.String getOriginatingCallsign()
Get the callsign of the station that originated this message (not of any Tx-Igate relay).

Returns:
String callsign

writeToSigningBuf

void writeToSigningBuf(java.io.DataOutput dos,
                       java.io.PrintStream ps)
Write the appropriate part of the body of this message to the signing buffer.

Parameters:
dos - DataOutput that will accept binary writes of the message data
ps - PrintStream that will accept character writes of the message data