Modifier and Type | Class and Description |
---|---|
private static class |
CryptoAES.Integrity
Helper class for providing integrity protection.
|
Modifier and Type | Field and Description |
---|---|
private org.apache.commons.crypto.cipher.CryptoCipher |
decryptor |
private org.apache.commons.crypto.cipher.CryptoCipher |
encryptor |
private CryptoAES.Integrity |
integrity |
Constructor and Description |
---|
CryptoAES(String transformation,
Properties properties,
byte[] inKey,
byte[] outKey,
byte[] inIv,
byte[] outIv) |
Modifier and Type | Method and Description |
---|---|
private void |
checkTransformation(String transformation) |
byte[] |
unwrap(byte[] data,
int offset,
int len)
Decrypts input data.
|
byte[] |
wrap(byte[] data,
int offset,
int len)
Encrypts input data.
|
private final org.apache.commons.crypto.cipher.CryptoCipher encryptor
private final org.apache.commons.crypto.cipher.CryptoCipher decryptor
private final CryptoAES.Integrity integrity
public CryptoAES(String transformation, Properties properties, byte[] inKey, byte[] outKey, byte[] inIv, byte[] outIv) throws IOException
IOException
public byte[] wrap(byte[] data, int offset, int len) throws SaslException
data
- the input byte arrayoffset
- the offset in input where the input startslen
- the input lengthSaslException
- if error happenspublic byte[] unwrap(byte[] data, int offset, int len) throws SaslException
data
- the input byte arrayoffset
- the offset in input where the input startslen
- the input lengthSaslException
- if error happensprivate void checkTransformation(String transformation) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.