public class RTPCrypt
extends java.lang.Object
Constructor and Description |
---|
RTPCrypt(Crypt crypter)
Creates a new RTPCrypt
|
Modifier and Type | Method and Description |
---|---|
int |
decryptCtrl(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Decrypts the given RTCP data
|
int |
decryptData(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Decrypts the given RTP data
|
int |
encryptCtrl(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Encrypts the given RTCP data
|
int |
encryptData(byte[] input,
int offset,
int length,
byte[] output,
int outOffset)
Encrypts the given RTP data
|
int |
getBlockSize() |
int |
getDecryptOutputSize(int inputSize) |
int |
getEncryptOutputSize(int inputSize) |
public RTPCrypt(Crypt crypter)
crypter
- The encryption standard to usepublic int encryptCtrl(byte[] input, int offset, int length, byte[] output, int outOffset) throws java.security.InvalidKeyException, javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException
input
- offset
- length
- output
- outOffset
- java.security.InvalidAlgorithmParameterException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidKeyException
public int encryptData(byte[] input, int offset, int length, byte[] output, int outOffset) throws java.security.InvalidKeyException, javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException
input
- offset
- length
- output
- outOffset
- java.security.InvalidAlgorithmParameterException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidKeyException
public int decryptCtrl(byte[] input, int offset, int length, byte[] output, int outOffset) throws java.security.InvalidKeyException, javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException
input
- offset
- length
- output
- outOffset
- java.security.InvalidAlgorithmParameterException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidKeyException
public int decryptData(byte[] input, int offset, int length, byte[] output, int outOffset) throws java.security.InvalidKeyException, javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, java.security.InvalidAlgorithmParameterException
input
- offset
- length
- output
- outOffset
- java.security.InvalidAlgorithmParameterException
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException
java.security.InvalidKeyException
public int getEncryptOutputSize(int inputSize)
Crypt.getEncryptOutputSize(int)
public int getDecryptOutputSize(int inputSize)
Crypt.getDecryptOutputSize(int)
public int getBlockSize()
Crypt.getBlockSize()