|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.security.mule.krb5.EncryptedData
public class EncryptedData
This class encapsulates Kerberos encrypted data. It allows callers access to both the ASN.1 encoded form of the EncryptedData type as well as the raw cipher text.
| Field Summary | |
|---|---|
static int |
ETYPE_AES128_CTS_HMAC_SHA1_96
|
static int |
ETYPE_AES256_CTS_HMAC_SHA1_96
|
static int |
ETYPE_ARCFOUR_HMAC
|
static int |
ETYPE_ARCFOUR_HMAC_EXP
|
static int |
ETYPE_DES_CBC_CRC
|
static int |
ETYPE_DES_CBC_MD4
|
static int |
ETYPE_DES_CBC_MD5
|
static int |
ETYPE_DES3_CBC_HMAC_SHA1_KD
|
static int |
ETYPE_NULL
|
| Constructor Summary | |
|---|---|
EncryptedData(EncryptionKey key,
byte[] plaintext,
int usage)
|
|
EncryptedData(int new_eType,
Integer new_kvno,
byte[] new_cipher)
|
|
| Method Summary | |
|---|---|
byte[] |
asn1Encode()
Returns an ASN.1 encoded EncryptedData type. |
Object |
clone()
|
byte[] |
decrypt(EncryptionKey key,
int usage)
|
byte[] |
getBytes()
Returns the raw cipher text bytes, not in ASN.1 encoding. |
int |
getEType()
|
Integer |
getKeyVersionNumber()
|
static EncryptedData |
parse(sun.security.util.DerInputStream data,
byte explicitTag,
boolean optional)
Parse (unmarshal) an EncryptedData from a DER input stream. |
byte[] |
reset(byte[] data,
boolean encoded)
Reset data stream after decryption, remove redundant bytes. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ETYPE_NULL
public static final int ETYPE_DES_CBC_CRC
public static final int ETYPE_DES_CBC_MD4
public static final int ETYPE_DES_CBC_MD5
public static final int ETYPE_ARCFOUR_HMAC
public static final int ETYPE_ARCFOUR_HMAC_EXP
public static final int ETYPE_DES3_CBC_HMAC_SHA1_KD
public static final int ETYPE_AES128_CTS_HMAC_SHA1_96
public static final int ETYPE_AES256_CTS_HMAC_SHA1_96
| Constructor Detail |
|---|
public EncryptedData(int new_eType,
Integer new_kvno,
byte[] new_cipher)
public EncryptedData(EncryptionKey key,
byte[] plaintext,
int usage)
throws KdcErrException,
KrbCryptoException
KdcErrException
KrbCryptoException| Method Detail |
|---|
public Object clone()
clone in class Object
public byte[] decrypt(EncryptionKey key,
int usage)
throws KdcErrException,
KrbApErrException,
KrbCryptoException
KdcErrException
KrbApErrException
KrbCryptoException
public byte[] asn1Encode()
throws Asn1Exception,
IOException
This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.
Asn1Exception - if an error occurs while decoding an
ASN1 encoded data.
IOException - if an I/O error occurs while reading
encoded data.
public static EncryptedData parse(sun.security.util.DerInputStream data,
byte explicitTag,
boolean optional)
throws Asn1Exception,
IOException
data - the Der input stream value, which contains one or more
marshaled value.explicitTag - tag number.optional - indicate if this data field is optional
Asn1Exception - if an error occurs while decoding an
ASN1 encoded data.
IOException - if an I/O error occurs while reading
encoded data.
public byte[] reset(byte[] data,
boolean encoded)
data - the decrypted data from decrypt().encoded - true if the encrypted data is ASN1 encoded data,
false if the encrypted data is not ASN1 encoded data.
public int getEType()
public Integer getKeyVersionNumber()
public byte[] getBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||