krb5.lib
Class EncryptedData

java.lang.Object
  extended by krb5.lib.EncryptedData
All Implemented Interfaces:
java.io.Serializable

public class EncryptedData
extends java.lang.Object
implements java.io.Serializable

Class Description : EncryptedData class. A modified version of the code obtained from the Open Group Research Institute.

Version:
1.1
Author:
Bojan Pajkovski
See Also:
Serialized Form

Constructor Summary
EncryptedData(EncryptionKey key, java.io.Serializable plainObject)
          Class constructor
EncryptedData(int new_eType, java.lang.Integer new_kvno, javax.crypto.SealedObject new_cipher)
          Class constructor
EncryptedData(java.lang.String password, java.io.Serializable plainObject)
          Class constructor
 
Method Summary
 java.lang.Object decrypt(EncryptionKey key)
          Decrypt sealed object
 java.lang.Object decrypt(java.lang.String password)
          Decrypt the sealed object
 java.lang.Object decryptedData()
          Return the decrypted object
 int getEtype()
          Return the encrypt type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptedData

public EncryptedData(int new_eType,
                     java.lang.Integer new_kvno,
                     javax.crypto.SealedObject new_cipher)
Class constructor

Parameters:
new_eType - int
new_kvno - Integer
new_cipher - SealedObject

EncryptedData

public EncryptedData(EncryptionKey key,
                     java.io.Serializable plainObject)
              throws KrbException
Class constructor

Parameters:
key - EncryptionKey
plainObject - Serializable
Throws:
KrbException

EncryptedData

public EncryptedData(java.lang.String password,
                     java.io.Serializable plainObject)
              throws KrbException
Class constructor

Parameters:
password - String
plainObject - Serializable
Throws:
KrbException
Method Detail

decrypt

public java.lang.Object decrypt(EncryptionKey key)
                         throws KrbException
Decrypt sealed object

Parameters:
key - EncryptionKey
Returns:
Object
Throws:
KrbException

decrypt

public java.lang.Object decrypt(java.lang.String password)
                         throws KrbException
Decrypt the sealed object

Parameters:
password - String
Returns:
Object
Throws:
KrbException

decryptedData

public java.lang.Object decryptedData()
Return the decrypted object

Returns:
Object

getEtype

public int getEtype()
Return the encrypt type

Returns:
int