public class SecretIvParameterSpec extends Object implements AlgorithmParameterSpec, Destroyable
Destroyable to clear the iv after usage.| Constructor and Description |
|---|
SecretIvParameterSpec(byte[] iv)
Create new secure iv parameters.
|
SecretIvParameterSpec(byte[] iv,
int offset,
int length)
Create new iv parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy iv material.
|
byte[] |
getIV()
Get copy of IV.
|
byte[] |
getIV(byte[] explicitNonce)
Get iv extended by the explicit nonce.
|
byte[] |
getIV(byte[] explicitNonce,
int offset,
int length)
Get iv extended by the explicit nonce.
|
boolean |
isDestroyed() |
public SecretIvParameterSpec(byte[] iv)
iv - byte arrayNullPointerException - if iv is nullIllegalArgumentException - if iv is empty.public SecretIvParameterSpec(byte[] iv,
int offset,
int length)
iv - byte array with the iv.offset - offset of the iv within the byte arraylength - length of the iv within the byte arrayNullPointerException - if iv is nullIllegalArgumentException - if iv is empty, or length is negative or
offset and length doesn't fit into iv.public byte[] getIV()
IllegalStateException - if instance was already destroyedpublic byte[] getIV(byte[] explicitNonce)
explicitNonce - byte array of explicit nonce.NullPointerException - if explicit nonce is nullIllegalArgumentException - explicit nonce iv is emptyIllegalStateException - if instance was already destroyedpublic byte[] getIV(byte[] explicitNonce,
int offset,
int length)
explicitNonce - byte array of explicit nonce.offset - offset within byte arraylength - length within byte arrayNullPointerException - if explicit nonce is nullIllegalArgumentException - explicit nonce iv is empty, or length is
negative or offset and length doesn't fit into explicit
nonce.IllegalStateException - if instance was already destroyedpublic void destroy()
throws DestroyFailedException
destroy in interface DestroyableDestroyFailedExceptionpublic boolean isDestroyed()
isDestroyed in interface DestroyableCopyright © 2023 Eclipse Foundation. All rights reserved.