krb5.lib
Class Checksum

java.lang.Object
  extended by krb5.lib.Checksum
All Implemented Interfaces:
java.io.Serializable

public class Checksum
extends java.lang.Object
implements java.io.Serializable

TODO Class Description : Checksum class. A modified version of the code obtained from the Open Group Research Institute.

Version:
1.1
Author:
Bojan Pajkovski
See Also:
Serialized Form

Field Summary
 byte[] checksum
          Checksum in array of bytes
 int cksumType
          Checksum type
 
Constructor Summary
Checksum(byte[] data)
          Class constructor
Checksum(int new_cksumType, byte[] data)
          Class constructor specifying type and array of data
Checksum(int new_cksumType, byte[] data, EncryptionKey key)
          Class constructor
 
Method Summary
 boolean isEqual(Checksum cksum)
          Check whether a given checksum value is the same this one
 boolean verifyKeyedChecksum(byte[] data, EncryptionKey key)
          Verifies the checksum value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cksumType

public int cksumType
Checksum type


checksum

public byte[] checksum
Checksum in array of bytes

Constructor Detail

Checksum

public Checksum(int new_cksumType,
                byte[] data)
         throws KrbException
Class constructor specifying type and array of data

Throws:
KrbException

Checksum

public Checksum(int new_cksumType,
                byte[] data,
                EncryptionKey key)
         throws KrbException
Class constructor

Parameters:
new_cksumType - int
data - byte[]
key - EncryptionKey
Throws:
KrbException

Checksum

public Checksum(byte[] data)
         throws KrbException
Class constructor

Parameters:
data - byte[]
Throws:
KrbException
Method Detail

verifyKeyedChecksum

public boolean verifyKeyedChecksum(byte[] data,
                                   EncryptionKey key)
                            throws KrbException
Verifies the checksum value

Parameters:
data - byte[]
key - EncryptionKey
Returns:
boolean
Throws:
KrbException

isEqual

public boolean isEqual(Checksum cksum)
                throws KrbException
Check whether a given checksum value is the same this one

Parameters:
cksum - Checksum
Returns:
boolean
Throws:
KrbException