public class CipherTextHandler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<EncryptionType,java.lang.Class<? extends EncryptionEngine>> |
DEFAULT_CIPHERS
a map of the default encryption types to the encryption engine class names
|
private static org.slf4j.Logger |
LOG_KRB
The loggers for this class
|
| Constructor and Description |
|---|
CipherTextHandler() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(EncryptionKey key,
EncryptedData data,
KeyUsage usage)
Decrypt a block of data.
|
EncryptedData |
encrypt(EncryptionKey key,
byte[] plainText,
KeyUsage usage) |
private EncryptionEngine |
getEngine(EncryptionKey key) |
EncryptedData |
seal(EncryptionKey key,
org.apache.directory.api.asn1.Asn1Object message,
KeyUsage usage)
Performs an encode and an encrypt.
|
private static final org.slf4j.Logger LOG_KRB
private static final java.util.Map<EncryptionType,java.lang.Class<? extends EncryptionEngine>> DEFAULT_CIPHERS
public EncryptedData seal(EncryptionKey key, org.apache.directory.api.asn1.Asn1Object message, KeyUsage usage) throws KerberosException
key - The key to use for encrypting.encodable - The Kerberos object to encode.usage - The key usage.KerberosExceptionpublic EncryptedData encrypt(EncryptionKey key, byte[] plainText, KeyUsage usage) throws KerberosException
KerberosExceptionpublic byte[] decrypt(EncryptionKey key, EncryptedData data, KeyUsage usage) throws KerberosException
key - The key used to decrypt the datadata - The data to decryptusage - The key usage numberKerberosException - If the decoding failedprivate EncryptionEngine getEngine(EncryptionKey key) throws KerberosException
KerberosException