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

java.lang.Object
  extended by sun.security.mule.krb5.internal.crypto.EType
      extended by sun.security.mule.krb5.internal.crypto.DesCbcMd5EType

public final class DesCbcMd5EType
extends EType


Constructor Summary
DesCbcMd5EType()
           
 
Method Summary
 int blockSize()
           
protected  byte[] calculateChecksum(byte[] data, int size)
          Calculates checksum using MD5.
 int checksumSize()
           
 int checksumType()
           
 int confounderSize()
           
 byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage)
          Decrypts the data using DES in CBC mode.
 byte[] decrypt(byte[] cipher, byte[] key, int usage)
          Decrypts the data using DES in CBC mode.
 byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage)
          Encrypts the data using DES in CBC mode.
 byte[] encrypt(byte[] data, byte[] key, int usage)
          Encrypts the data using DES in CBC mode.
 int eType()
           
protected  boolean isChecksumValid(byte[] data)
           
 int keySize()
           
 int keyType()
           
 int minimumPadSize()
           
 
Methods inherited from class sun.security.mule.krb5.internal.crypto.EType
dataSize, decryptedData, getBuiltInDefaults, getDefaults, getDefaults, getInstance, isSupported, isSupported, padSize, startOfChecksum, startOfData, startOfPad, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesCbcMd5EType

public DesCbcMd5EType()
Method Detail

eType

public int eType()
Specified by:
eType in class EType

minimumPadSize

public int minimumPadSize()
Specified by:
minimumPadSize in class EType

confounderSize

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

checksumType

public int checksumType()
Specified by:
checksumType in class EType

checksumSize

public int checksumSize()
Specified by:
checksumSize in class EType

calculateChecksum

protected byte[] calculateChecksum(byte[] data,
                                   int size)
                            throws KrbCryptoException
Calculates checksum using MD5.

Parameters:
data - the input data.
size - the length of data.
Returns:
the checksum.
Throws:
KrbCryptoException

blockSize

public int blockSize()
Specified by:
blockSize in class EType

keyType

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

keySize

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

encrypt

public byte[] encrypt(byte[] data,
                      byte[] key,
                      int usage)
               throws KrbCryptoException
Encrypts the data using DES in CBC mode.

Specified by:
encrypt in class EType
Parameters:
data - the buffer for plain text.
key - the key to encrypt the data.
Returns:
the buffer for encrypted data.
Throws:
KrbCryptoException

encrypt

public byte[] encrypt(byte[] data,
                      byte[] key,
                      byte[] ivec,
                      int usage)
               throws KrbCryptoException
Encrypts the data using DES in CBC mode.

Specified by:
encrypt in class EType
Parameters:
data - the buffer for plain text.
key - the key to encrypt the data.
ivec - initialization vector.
Returns:
buffer for encrypted data.
Throws:
KrbCryptoException

decrypt

public byte[] decrypt(byte[] cipher,
                      byte[] key,
                      int usage)
               throws KrbApErrException,
                      KrbCryptoException
Decrypts the data using DES in CBC mode.

Specified by:
decrypt in class EType
Parameters:
cipher - the input buffer.
key - the key to decrypt the data.
Throws:
KrbApErrException
KrbCryptoException

decrypt

public byte[] decrypt(byte[] cipher,
                      byte[] key,
                      byte[] ivec,
                      int usage)
               throws KrbApErrException,
                      KrbCryptoException
Decrypts the data using DES in CBC mode.

Specified by:
decrypt in class EType
Parameters:
cipher - the input buffer.
key - the key to decrypt the data.
ivec - initialization vector.
Throws:
KrbApErrException
KrbCryptoException

isChecksumValid

protected boolean isChecksumValid(byte[] data)
                           throws KrbCryptoException
Throws:
KrbCryptoException


Copyright © 2013. All Rights Reserved.