public class Aes128CtsSha1Encryption extends EncryptionEngine
Constructor and Description |
---|
Aes128CtsSha1Encryption() |
Modifier and Type | Method and Description |
---|---|
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() |
concatenateBytes, deriveRandom, getBit, getRandomBytes, getUsageKc, getUsageKe, getUsageKi, padString, removeLeadingBytes, removeTrailingBytes, setBit
public Aes128CtsSha1Encryption()
public EncryptionType getEncryptionType()
getEncryptionType
in class EncryptionEngine
public ChecksumType checksumType()
ChecksumEngine
public int getKeyLength()
public int getConfounderLength()
getConfounderLength
in class EncryptionEngine
public int getChecksumLength()
getChecksumLength
in class EncryptionEngine
public byte[] calculateChecksum(byte[] data, byte[] key, KeyUsage usage)
ChecksumEngine
calculateChecksum
in interface ChecksumEngine
data
- The datakey
- The keyusage
- The Key usage numberpublic byte[] calculateIntegrity(byte[] data, byte[] key, KeyUsage usage)
calculateIntegrity
in class EncryptionEngine
public byte[] getDecryptedData(EncryptionKey key, EncryptedData data, KeyUsage usage) throws KerberosException
getDecryptedData
in class EncryptionEngine
KerberosException
public EncryptedData getEncryptedData(EncryptionKey key, byte[] plainText, KeyUsage usage)
getEncryptedData
in class EncryptionEngine
public byte[] encrypt(byte[] plainText, byte[] keyBytes)
encrypt
in class EncryptionEngine
public byte[] decrypt(byte[] cipherText, byte[] keyBytes)
decrypt
in class EncryptionEngine
protected byte[] deriveKey(byte[] baseKey, byte[] usage, int n, int k)
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.