org.apache.directory.server.kerberos.shared.crypto.encryption
Class CipherTextHandler

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler

public class CipherTextHandler
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.

Version:
$Rev: 548929 $, $Date: 2007-06-20 06:28:46 +0200 (Mi, 20 Jun 2007) $
Author:
Apache Directory Project

Constructor Summary
CipherTextHandler()
           
 
Method Summary
 EncryptedData seal(EncryptionKey key, Encodable encodable, KeyUsage usage)
          Performs an encode and an encrypt.
 Encodable unseal(java.lang.Class hint, EncryptionKey key, EncryptedData data, KeyUsage usage)
          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

CipherTextHandler

public CipherTextHandler()
Method Detail

seal

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

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

unseal

public Encodable unseal(java.lang.Class hint,
                        EncryptionKey key,
                        EncryptedData data,
                        KeyUsage usage)
                 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.
usage - The key usage.
Returns:
The Kerberos object resulting from a successful decrypt and decode.
Throws:
KerberosException


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