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

java.lang.Object
  extended by sun.security.mule.krb5.internal.crypto.EType
Direct Known Subclasses:
Aes128CtsHmacSha1EType, Aes256CtsHmacSha1EType, ArcFourHmacEType, Des3CbcHmacSha1KdEType, DesCbcCrcEType, DesCbcMd5EType, NullEType

public abstract class EType
extends Object


Constructor Summary
EType()
           
 
Method Summary
abstract  int blockSize()
           
abstract  int checksumSize()
           
abstract  int checksumType()
           
abstract  int confounderSize()
           
 int dataSize(byte[] data)
           
abstract  byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage)
           
abstract  byte[] decrypt(byte[] cipher, byte[] key, int usage)
           
 byte[] decryptedData(byte[] data)
           
abstract  byte[] encrypt(byte[] data, byte[] key, byte[] ivec, int usage)
           
abstract  byte[] encrypt(byte[] data, byte[] key, int usage)
           
abstract  int eType()
           
static int[] getBuiltInDefaults()
           
static int[] getDefaults(String configName, Config kerberosConfig)
          Retrieves the default etypes from the configuration file, or if that's not available, return the built-in list of default etypes.
static int[] getDefaults(String configName, EncryptionKey[] keys, Config kerberosConfig)
          Retrieve the default etypes from the configuration file for those etypes for which there are corresponding keys.
static EType getInstance(int eTypeConst)
           
static boolean isSupported(int eTypeConst)
           
static boolean isSupported(int eTypeConst, int[] config)
           
abstract  int keySize()
           
abstract  int keyType()
           
abstract  int minimumPadSize()
           
 int padSize(byte[] data)
           
 int startOfChecksum()
           
 int startOfData()
           
 int startOfPad(byte[] data)
           
static String toString(int type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EType

public EType()
Method Detail

getInstance

public static EType getInstance(int eTypeConst)
                         throws KdcErrException
Throws:
KdcErrException

eType

public abstract int eType()

minimumPadSize

public abstract int minimumPadSize()

confounderSize

public abstract int confounderSize()

checksumType

public abstract int checksumType()

checksumSize

public abstract int checksumSize()

blockSize

public abstract int blockSize()

keyType

public abstract int keyType()

keySize

public abstract int keySize()

encrypt

public abstract byte[] encrypt(byte[] data,
                               byte[] key,
                               int usage)
                        throws KrbCryptoException
Throws:
KrbCryptoException

encrypt

public abstract byte[] encrypt(byte[] data,
                               byte[] key,
                               byte[] ivec,
                               int usage)
                        throws KrbCryptoException
Throws:
KrbCryptoException

decrypt

public abstract byte[] decrypt(byte[] cipher,
                               byte[] key,
                               int usage)
                        throws KrbApErrException,
                               KrbCryptoException
Throws:
KrbApErrException
KrbCryptoException

decrypt

public abstract byte[] decrypt(byte[] cipher,
                               byte[] key,
                               byte[] ivec,
                               int usage)
                        throws KrbApErrException,
                               KrbCryptoException
Throws:
KrbApErrException
KrbCryptoException

dataSize

public int dataSize(byte[] data)

padSize

public int padSize(byte[] data)

startOfChecksum

public int startOfChecksum()

startOfData

public int startOfData()

startOfPad

public int startOfPad(byte[] data)

decryptedData

public byte[] decryptedData(byte[] data)

getBuiltInDefaults

public static int[] getBuiltInDefaults()

getDefaults

public static int[] getDefaults(String configName,
                                Config kerberosConfig)
Retrieves the default etypes from the configuration file, or if that's not available, return the built-in list of default etypes.


getDefaults

public static int[] getDefaults(String configName,
                                EncryptionKey[] keys,
                                Config kerberosConfig)
                         throws KrbException
Retrieve the default etypes from the configuration file for those etypes for which there are corresponding keys. Used in scenario we have some keys from a keytab with etypes different from those named in configName. Then, in order to decrypt an AS-REP, we should only ask for etypes for which we have keys.

Throws:
KrbException

isSupported

public static boolean isSupported(int eTypeConst,
                                  int[] config)

isSupported

public static boolean isSupported(int eTypeConst)

toString

public static String toString(int type)


Copyright © 2013. All Rights Reserved.