org.apache.directory.server.kerberos.shared.service
Class LockBox

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.service.LockBox

public class LockBox
extends java.lang.Object

A Hashed Adapter encapsulating ASN.1 encoders and decoders and cipher text engines to perform seal() and unseal() operations. A seal() operation performs an encode and an encrypt, while an unseal() operation performs a decrypt and a decode.


Constructor Summary
LockBox()
           
 
Method Summary
 EncryptedData seal(EncryptionKey key, Encodable encodable)
          Performs an encode and an encrypt.
 Encodable unseal(java.lang.Class hint, EncryptionKey key, EncryptedData data)
          Perform a decrypt and a decode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockBox

public LockBox()
Method Detail

seal

public EncryptedData seal(EncryptionKey key,
                          Encodable encodable)
                   throws KerberosException
Performs an encode and an encrypt.

Parameters:
key - The key to use for encrypting.
encodable - The Kerberos object to encode.
Returns:
The Kerberos EncryptedData.
Throws:
KerberosException

unseal

public Encodable unseal(java.lang.Class hint,
                        EncryptionKey key,
                        EncryptedData data)
                 throws KerberosException
Perform a decrypt and a decode.

Parameters:
hint - The class the encrypted data is expected to contain.
key - The key to use for decryption.
data - The data to decrypt.
Returns:
The Kerberos object resulting from a successful decrypt and decode.
Throws:
KerberosException


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.