sun.security.mule.krb5.internal.crypto
Class HmacMd5ArcFourCksumType

java.lang.Object
  extended by sun.security.mule.krb5.internal.crypto.CksumType
      extended by sun.security.mule.krb5.internal.crypto.HmacMd5ArcFourCksumType

public class HmacMd5ArcFourCksumType
extends CksumType

This class encapsulates the checksum type for HMAC RC4

Author:
Seema Malkani

Constructor Summary
HmacMd5ArcFourCksumType()
           
 
Method Summary
 byte[] calculateChecksum(byte[] data, int size)
           
 byte[] calculateKeyedChecksum(byte[] data, int size, byte[] key, int usage)
          Calculates keyed checksum.
 int cksumSize()
           
 int cksumType()
           
 int confounderSize()
           
 boolean isSafe()
           
 int keySize()
           
 int keyType()
           
 boolean verifyKeyedChecksum(byte[] data, int size, byte[] key, byte[] checksum, int usage)
          Verifies keyed checksum.
 
Methods inherited from class sun.security.mule.krb5.internal.crypto.CksumType
getInstance, getInstance, isChecksumEqual
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HmacMd5ArcFourCksumType

public HmacMd5ArcFourCksumType()
Method Detail

confounderSize

public int confounderSize()
Specified by:
confounderSize in class CksumType

cksumType

public int cksumType()
Specified by:
cksumType in class CksumType

isSafe

public boolean isSafe()
Specified by:
isSafe in class CksumType

cksumSize

public int cksumSize()
Specified by:
cksumSize in class CksumType

keyType

public int keyType()
Specified by:
keyType in class CksumType

keySize

public int keySize()
Specified by:
keySize in class CksumType

calculateChecksum

public byte[] calculateChecksum(byte[] data,
                                int size)
Specified by:
calculateChecksum in class CksumType

calculateKeyedChecksum

public byte[] calculateKeyedChecksum(byte[] data,
                                     int size,
                                     byte[] key,
                                     int usage)
                              throws KrbCryptoException
Calculates keyed checksum.

Specified by:
calculateKeyedChecksum in class CksumType
Parameters:
data - the data used to generate the checksum.
size - length of the data.
key - the key used to encrypt the checksum.
Returns:
keyed checksum.
Throws:
KrbCryptoException

verifyKeyedChecksum

public boolean verifyKeyedChecksum(byte[] data,
                                   int size,
                                   byte[] key,
                                   byte[] checksum,
                                   int usage)
                            throws KrbCryptoException
Verifies keyed checksum.

Specified by:
verifyKeyedChecksum in class CksumType
Parameters:
data - the data.
size - the length of data.
key - the key used to encrypt the checksum.
checksum -
Returns:
true if verification is successful.
Throws:
KrbCryptoException


Copyright © 2013. All Rights Reserved.