| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private Integer | |
| public static final EncryptionKey |
| Access | Constructor and Description |
|---|---|
| public | |
| public | EncryptionKey(int keyType, byte[] keyValue)
Constructs an EncryptionKey by using the specified key type and key value. |
| public | |
| public | |
| public | EncryptionKey(DerValue
a single DER-encoded value. encoding)Constructs an instance of EncryptionKey type. |
| Modifier and Type | Method and Description |
|---|---|
| public static EncryptionKey | Returns: never nullNOT null cname, char[] NOT null password, int etype, PAData.can be NULL snpObtains a key for a given etype of a principal with possible new salt and s2kparams |
| public static EncryptionKey | Returns: never nullNOT null password, String NOT null salt, int etype, byte[] can be NULL s2kparams)Obtains a key for a given etype with salt and optional s2kparams |
| public static EncryptionKey[] | Returns: an array of secret keys or null if none were found.the principal whose secret key is desired princ, String the path to the keytab file. A value of null
will be accepted to indicate that the default path should be
searched. keytab)Obtains all versions of the secret key of the principal from a keytab. |
| public static EncryptionKey[] | acquireSecretKeys(char[] password, String salt)
Generate a list of keys using the given principal and password. |
| public synchronized byte[] | Returns: byte array of encoded EncryptionKey object.Returns the ASN.1 encoding of this EncryptionKey. |
| public synchronized Object | |
| public synchronized void | |
| public static EncryptionKey | |
| public static EncryptionKey | findKey(int etype, Integer
if null, return any (first?) key kvno, EncryptionKey[] keys)Find a key with given etype and kvno |
| public final byte[] | |
| public synchronized int | |
| public final Integer | |
| public static EncryptionKey | Returns: an instance of EncryptionKey.the Der input stream value, which contains one or more
marshaled value. data, byte tag number. explicitTag, boolean indicate if this data field is optional optional)Parse (unmarshal) an Encryption key from a DER input stream. |
| private static byte[] | |
| public String | |
| private static boolean | |
| public synchronized void | writeKey(CCacheOutputStream
a cos)CCacheOutputStream to be written to.Writes key value in FCC format to a |
| keyType | back to summary |
|---|---|
| private int keyType | |
| keyValue | back to summary |
|---|---|
| private byte[] keyValue | |
| kvno | back to summary |
|---|---|
| private Integer kvno | |
| NULL_KEY | back to summary |
|---|---|
| public static final EncryptionKey NULL_KEY | |
| EncryptionKey | back to summary |
|---|---|
| public EncryptionKey(byte[] keyValue, int keyType, Integer kvno) | |
| EncryptionKey | back to summary |
|---|---|
| public EncryptionKey(int keyType, byte[] keyValue) Constructs an EncryptionKey by using the specified key type and key value. It is used to recover the key when retrieving data from credential cache file. | |
| EncryptionKey | back to summary |
|---|---|
| public EncryptionKey(char[] password, String salt, String algorithm) throws KrbCryptoException | |
| EncryptionKey | back to summary |
|---|---|
| public EncryptionKey(EncryptionKey key) throws KrbCryptoException Generates a sub-sessionkey from a given session key. Used in AcceptSecContextToken and KrbApReq by acceptor- and initiator- side respectively. | |
| EncryptionKey | back to summary |
|---|---|
| public EncryptionKey(DerValue encoding) throws Asn1Exception, IOException Constructs an instance of EncryptionKey type.
| |
| acquireSecretKey | back to summary |
|---|---|
| public static EncryptionKey acquireSecretKey(PrincipalName cname, char[] password, int etype, PAData. Obtains a key for a given etype of a principal with possible new salt and s2kparams
| |
| acquireSecretKey | back to summary |
|---|---|
| public static EncryptionKey acquireSecretKey(char[] password, String salt, int etype, byte[] s2kparams) throws KrbException Obtains a key for a given etype with salt and optional s2kparams
| |
| acquireSecretKeys | back to summary |
|---|---|
| public static EncryptionKey[] acquireSecretKeys(PrincipalName princ, String keytab) Obtains all versions of the secret key of the principal from a keytab.
| |
| acquireSecretKeys | back to summary |
|---|---|
| public static EncryptionKey[] acquireSecretKeys(char[] password, String salt) throws KrbException Generate a list of keys using the given principal and password. Construct a key for each configured etype. Caller is responsible for clearing password. | |
| asn1Encode | back to summary |
|---|---|
| public synchronized byte[] asn1Encode() throws Asn1Exception, IOException Returns the ASN.1 encoding of this EncryptionKey.
This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.
| |
| clone | back to summary |
|---|---|
| public synchronized Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| destroy | back to summary |
|---|---|
| public synchronized void destroy() | |
| findKey | back to summary |
|---|---|
| public static EncryptionKey findKey(int etype, EncryptionKey[] keys) throws KrbException Find a key with given etype | |
| findKey | back to summary |
|---|---|
| public static EncryptionKey findKey(int etype, Integer kvno, EncryptionKey[] keys) throws KrbException Find a key with given etype and kvno
| |
| getBytes | back to summary |
|---|---|
| public final byte[] getBytes() Returns the raw key bytes, not in any ASN.1 encoding. | |
| getEType | back to summary |
|---|---|
| public synchronized int getEType() | |
| getKeyVersionNumber | back to summary |
|---|---|
| public final Integer getKeyVersionNumber() | |
| parse | back to summary |
|---|---|
| public static EncryptionKey parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException Parse (unmarshal) an Encryption key from a DER input stream. This form parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.
| |
| stringToKey | back to summary |
|---|---|
| private static byte[] stringToKey(char[] password, String salt, byte[] s2kparams, int keyType) throws KrbCryptoException | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| versionMatches | back to summary |
|---|---|
| private static boolean versionMatches(Integer v1, Integer v2) Determines if a kvno matches another kvno. Used in the method findKey(type, kvno, keys). Always returns true if either input is null or zero, in case any side does not have kvno info available. Note zero is included because N/A is not a legal value for kvno in javax.security.auth.kerberos.KerberosKey. Therefore, the info that the kvno is N/A might be lost when converting between this class and KerberosKey. | |
| writeKey | back to summary |
|---|---|
| public synchronized void writeKey(CCacheOutputStream cos) throws IOException Writes key value in FCC format to a
| |