issrg.SAWS
Class TCBContentRW

java.lang.Object
  extended by issrg.SAWS.TCBContentRW

public class TCBContentRW
extends java.lang.Object

Author:
W.Xu

Constructor Summary
TCBContentRW(java.lang.String lastFilename, int SN, byte[] hash, int debugLevel, javax.security.auth.callback.CallbackHandler ch)
           
TCBContentRW(java.lang.String trustedLocationL, javax.crypto.SecretKey secretKeyL, javax.crypto.spec.PBEParameterSpec param, int debugLevel, javax.security.auth.callback.CallbackHandler ch)
           
 
Method Summary
 int extractASN1Block(byte[] asn1Block)
           
 byte[] generateASN1Block()
           
 byte[] getLastAccHash()
           
 java.lang.String getLastFilename()
           
 int getLastSN()
           
 int read()
          This method is for reading the TCBLocation
 void setCallbackHandler(javax.security.auth.callback.CallbackHandler ch)
          Method that sets the callback handler for the class.
 void setLastAccHash(byte[] hash)
           
 void setLastFilename(java.lang.String Filename)
           
 void setLastSN(int SN)
           
 void setTCBContent(java.lang.String Filename, int SN, byte[] hash)
           
 int write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCBContentRW

public TCBContentRW(java.lang.String trustedLocationL,
                    javax.crypto.SecretKey secretKeyL,
                    javax.crypto.spec.PBEParameterSpec param,
                    int debugLevel,
                    javax.security.auth.callback.CallbackHandler ch)

TCBContentRW

public TCBContentRW(java.lang.String lastFilename,
                    int SN,
                    byte[] hash,
                    int debugLevel,
                    javax.security.auth.callback.CallbackHandler ch)
Method Detail

setCallbackHandler

public void setCallbackHandler(javax.security.auth.callback.CallbackHandler ch)
Method that sets the callback handler for the class. If the handler is null, the class will keep using the default callback handler.

Parameters:
ch - The callback handler.

write

public int write()

read

public int read()
This method is for reading the TCBLocation


setLastFilename

public void setLastFilename(java.lang.String Filename)

setLastSN

public void setLastSN(int SN)

setLastAccHash

public void setLastAccHash(byte[] hash)

setTCBContent

public void setTCBContent(java.lang.String Filename,
                          int SN,
                          byte[] hash)

getLastFilename

public java.lang.String getLastFilename()

getLastSN

public int getLastSN()

getLastAccHash

public byte[] getLastAccHash()

generateASN1Block

public byte[] generateASN1Block()

extractASN1Block

public int extractASN1Block(byte[] asn1Block)