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

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

public class DesMacCksumType
extends CksumType


Constructor Summary
DesMacCksumType()
           
 
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

DesMacCksumType

public DesMacCksumType()
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.