P2PWNC
Class P2PWNCReceipt

java.lang.Object
  extended byP2PWNC.P2PWNCProto
      extended byP2PWNC.P2PWNCReceipt

class P2PWNCReceipt
extends P2PWNCProto

This class represents a P2PWNC protocol receipt. A receipt is composed of the consumer's certificate, provider public key, session timestamp and receipt weight. All the above (in that order), are serialized and signed using the consumer's private key. The receipt signature (instance of the P2PWNCSignature class) is added to the P2PWNCReceipt object (receiptSignature field).

Version:
0.0.1
Author:
Pantelis Frangoudis, Elias Efstathiou

Field Summary
protected  P2PWNCCert consumerCert
           
static int P2PWNC_ALGO_ECC
          Elliptic Curve cryptosystem identifier.
static int P2PWNC_ALGO_RSA
          RSA cryptosystem identifier.
static int P2PWNC_MSG_CACK
          This message type corresponds to a P2PWNC "connection acknowledgement" message (CACK).
static int P2PWNC_MSG_CONN
          This message type corresponds to a P2PWNC "connect" message (CONN).
static int P2PWNC_MSG_RCPT
          This message type corresponds to a P2PWNC "receipt" message (RCPT).
static int P2PWNC_MSG_RREQ
          This message type corresponds to a P2PWNC "receipt request" message (RREQ).
static int P2PWNC_MSG_TEAR
          This message type corresponds to a P2PWNC "tear connection" message (TEAR).
static int P2PWNC_SERVER_PORT
          The standard port a service provider listens for client messages, as specified by the P2PWNC protocol).
protected  P2PWNCKey providerPublicKey
           
protected  P2PWNCSignature receiptSignature
           
protected  int timestamp
           
protected  int weight
           
 
Constructor Summary
(package private) P2PWNCReceipt()
           
(package private) P2PWNCReceipt(P2PWNCCert consumerCert, P2PWNCKey providerPublicKey, int timestamp, int weight, P2PWNCSignature receiptSignature)
           
 
Method Summary
 P2PWNCCert getConsumerCert()
           
 P2PWNCKey getProviderPublicKey()
           
 P2PWNCSignature getReceiptSignature()
           
 int getTimestamp()
           
 int getWeight()
           
 void setConsumerCert(P2PWNCCert consumerCert)
           
 void setProviderPublicKey(P2PWNCKey providerPublicKey)
           
 void setReceiptSignature(P2PWNCSignature receiptSignature)
           
 void setTimestamp(int timestamp)
           
 void setWeight(int weight)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumerCert

protected P2PWNCCert consumerCert

providerPublicKey

protected P2PWNCKey providerPublicKey

timestamp

protected int timestamp

weight

protected int weight

receiptSignature

protected P2PWNCSignature receiptSignature

P2PWNC_SERVER_PORT

public static final int P2PWNC_SERVER_PORT
The standard port a service provider listens for client messages, as specified by the P2PWNC protocol).

See Also:
Constant Field Values

P2PWNC_ALGO_RSA

public static final int P2PWNC_ALGO_RSA
RSA cryptosystem identifier.

See Also:
Constant Field Values

P2PWNC_ALGO_ECC

public static final int P2PWNC_ALGO_ECC
Elliptic Curve cryptosystem identifier.

See Also:
Constant Field Values

P2PWNC_MSG_RCPT

public static final int P2PWNC_MSG_RCPT
This message type corresponds to a P2PWNC "receipt" message (RCPT).

See Also:
Constant Field Values

P2PWNC_MSG_CONN

public static final int P2PWNC_MSG_CONN
This message type corresponds to a P2PWNC "connect" message (CONN).

See Also:
Constant Field Values

P2PWNC_MSG_RREQ

public static final int P2PWNC_MSG_RREQ
This message type corresponds to a P2PWNC "receipt request" message (RREQ).

See Also:
Constant Field Values

P2PWNC_MSG_CACK

public static final int P2PWNC_MSG_CACK
This message type corresponds to a P2PWNC "connection acknowledgement" message (CACK).

See Also:
Constant Field Values

P2PWNC_MSG_TEAR

public static final int P2PWNC_MSG_TEAR
This message type corresponds to a P2PWNC "tear connection" message (TEAR).

See Also:
Constant Field Values
Constructor Detail

P2PWNCReceipt

P2PWNCReceipt()

P2PWNCReceipt

P2PWNCReceipt(P2PWNCCert consumerCert,
              P2PWNCKey providerPublicKey,
              int timestamp,
              int weight,
              P2PWNCSignature receiptSignature)
Method Detail

getConsumerCert

public P2PWNCCert getConsumerCert()

getProviderPublicKey

public P2PWNCKey getProviderPublicKey()

getTimestamp

public int getTimestamp()

getWeight

public int getWeight()

getReceiptSignature

public P2PWNCSignature getReceiptSignature()

setConsumerCert

public void setConsumerCert(P2PWNCCert consumerCert)

setProviderPublicKey

public void setProviderPublicKey(P2PWNCKey providerPublicKey)

setTimestamp

public void setTimestamp(int timestamp)

setWeight

public void setWeight(int weight)

setReceiptSignature

public void setReceiptSignature(P2PWNCSignature receiptSignature)