com.solers.slp
Class AuthenticationBlock

java.lang.Object
  |
  +--com.solers.slp.AuthenticationBlock

public class AuthenticationBlock
extends Object

Implementation of the SLP Authentication Block.

Author:
Patrick Callis

Field Summary
private  SLPConfiguration _conf
           
private  byte[] _data
           
private  PrivateKey _privateKey
           
private  PublicKey _publicKey
           
private  byte[] _sig
           
private  String _spi
           
private  int _timestamp
           
private static org.apache.log4j.Category cat
           
 
Constructor Summary
(package private) AuthenticationBlock()
           
(package private) AuthenticationBlock(short bsd, String spi, int timestamp, byte[] data, byte[] signature)
           
 
Method Summary
(package private)  int calcSize()
           
(package private)  String getSPI()
           
(package private)  int getTimestamp()
           
(package private)  void readBlock(DataInput in)
           
private  void sign()
           
(package private)  boolean verify(byte[] data)
           
(package private)  void writeBlock(DataOutput out)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

cat

private static org.apache.log4j.Category cat

_publicKey

private PublicKey _publicKey

_privateKey

private PrivateKey _privateKey

_timestamp

private int _timestamp

_data

private byte[] _data

_conf

private SLPConfiguration _conf

_sig

private byte[] _sig

_spi

private String _spi
Constructor Detail

AuthenticationBlock

AuthenticationBlock(short bsd,
                    String spi,
                    int timestamp,
                    byte[] data,
                    byte[] signature)
              throws ServiceLocationException

AuthenticationBlock

AuthenticationBlock()
Method Detail

sign

private void sign()
           throws ServiceLocationException

getSPI

String getSPI()

getTimestamp

int getTimestamp()

verify

boolean verify(byte[] data)
         throws ServiceLocationException

calcSize

int calcSize()

writeBlock

void writeBlock(DataOutput out)
          throws IOException

readBlock

void readBlock(DataInput in)
         throws IOException