public class KeyWithIVParameters extends Object implements SymmetricCipherParameters
Constructor and Description |
---|
KeyWithIVParameters(byte[] key,
byte[] iv)
Initialize parameters.
|
KeyWithIVParameters(byte[] key,
int ivSize)
Initialize parameters with a random initialization vector.
|
KeyWithIVParameters(byte[] key,
int ivSize,
SecureRandom random)
Initialize parameters.
|
KeyWithIVParameters(KeyParameter key,
byte[] iv)
Initialize parameters.
|
KeyWithIVParameters(KeyParameter key,
int ivSize)
Initialize parameters.
|
KeyWithIVParameters(KeyParameter key,
int ivSize,
SecureRandom random)
Initialize parameters.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getIV() |
byte[] |
getKey() |
KeyParameter |
getKeyParameter() |
public KeyWithIVParameters(byte[] key, int ivSize)
key
- the key.ivSize
- the size of the initialization vector.public KeyWithIVParameters(byte[] key, byte[] iv)
key
- the key.iv
- the initialization vector.public KeyWithIVParameters(byte[] key, int ivSize, SecureRandom random)
key
- the key.ivSize
- the size of the initialization vector to randomize.random
- the random source.public KeyWithIVParameters(KeyParameter key, int ivSize)
key
- the key.ivSize
- the size of the initialization vector to randomize using a new default SecureRandom.public KeyWithIVParameters(KeyParameter key, int ivSize, SecureRandom random)
key
- the key.ivSize
- the size of the initialization vector to randomize.random
- the random source.public KeyWithIVParameters(KeyParameter key, byte[] iv)
key
- the key.iv
- the initialization vector.public KeyParameter getKeyParameter()
public byte[] getKey()
public byte[] getIV()
Copyright © 2004–2021 XWiki. All rights reserved.