org.apache.directory.server.kerberos.shared.crypto.encryption
Class Aes256CtsSha1Encryption
java.lang.Object
org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionEngine
org.apache.directory.server.kerberos.shared.crypto.encryption.Aes256CtsSha1Encryption
- All Implemented Interfaces:
- ChecksumEngine
public class Aes256CtsSha1Encryption
- extends EncryptionEngine
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
Method Summary |
byte[] |
calculateChecksum(byte[] data,
byte[] key,
KeyUsage usage)
Calculate a checksum given raw bytes and an (optional) key. |
byte[] |
calculateIntegrity(byte[] data,
byte[] key,
KeyUsage usage)
|
ChecksumType |
checksumType()
Returns the checksum type of this checksum engine. |
byte[] |
decrypt(byte[] cipherText,
byte[] keyBytes)
|
protected byte[] |
deriveKey(byte[] baseKey,
byte[] usage,
int n,
int k)
|
byte[] |
encrypt(byte[] plainText,
byte[] keyBytes)
|
int |
getChecksumLength()
|
int |
getConfounderLength()
|
byte[] |
getDecryptedData(EncryptionKey key,
EncryptedData data,
KeyUsage usage)
|
EncryptedData |
getEncryptedData(EncryptionKey key,
byte[] plainText,
KeyUsage usage)
|
EncryptionType |
getEncryptionType()
|
int |
getKeyLength()
|
Methods inherited from class org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionEngine |
concatenateBytes, deriveRandom, getBit, getRandomBytes, getUsageKc, getUsageKe, getUsageKi, padString, removeLeadingBytes, removeTrailingBytes, setBit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Aes256CtsSha1Encryption
public Aes256CtsSha1Encryption()
getEncryptionType
public EncryptionType getEncryptionType()
- Specified by:
getEncryptionType
in class EncryptionEngine
checksumType
public ChecksumType checksumType()
- Description copied from interface:
ChecksumEngine
- Returns the checksum type of this checksum engine.
- Returns:
- The checksum type.
getKeyLength
public int getKeyLength()
getConfounderLength
public int getConfounderLength()
- Specified by:
getConfounderLength
in class EncryptionEngine
getChecksumLength
public int getChecksumLength()
- Specified by:
getChecksumLength
in class EncryptionEngine
calculateChecksum
public byte[] calculateChecksum(byte[] data,
byte[] key,
KeyUsage usage)
- Description copied from interface:
ChecksumEngine
- Calculate a checksum given raw bytes and an (optional) key.
- Specified by:
calculateChecksum
in interface ChecksumEngine
- Returns:
- The checksum value.
calculateIntegrity
public byte[] calculateIntegrity(byte[] data,
byte[] key,
KeyUsage usage)
- Specified by:
calculateIntegrity
in class EncryptionEngine
getDecryptedData
public byte[] getDecryptedData(EncryptionKey key,
EncryptedData data,
KeyUsage usage)
throws KerberosException
- Specified by:
getDecryptedData
in class EncryptionEngine
- Throws:
KerberosException
getEncryptedData
public EncryptedData getEncryptedData(EncryptionKey key,
byte[] plainText,
KeyUsage usage)
- Specified by:
getEncryptedData
in class EncryptionEngine
encrypt
public byte[] encrypt(byte[] plainText,
byte[] keyBytes)
- Specified by:
encrypt
in class EncryptionEngine
decrypt
public byte[] decrypt(byte[] cipherText,
byte[] keyBytes)
- Specified by:
decrypt
in class EncryptionEngine
deriveKey
protected byte[] deriveKey(byte[] baseKey,
byte[] usage,
int n,
int k)
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.