public interface IPRCipher
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
byte[] |
decrypt(byte[] aInput)
Decrypts the supplied byte array using the cipher
associated with this instance.
|
byte[] |
encrypt(byte[] aInput)
Encrypts the supplied byte array using the cipher
associated with this instance.
|
byte[] |
generateIV()
Generates an initialization vector that may be used with
this cipher.
|
byte[] |
generateKey()
Generates a key that may be used with this cipher.
|
javax.crypto.CipherInputStream |
getInputStream(java.io.InputStream aInput)
Supplies a CipherInputStream using the cipher associated
with this instance.
|
javax.crypto.CipherOutputStream |
getOutputStream(java.io.OutputStream aInput)
Supplies a CipherOutputStream using the cipher associated
with this instance.
|
boolean |
needsIV()
Set by constructor if the supplied parameters are insufficient
in that an initialization vector is required.
|
static final java.lang.String VERSION
static final java.lang.String COPYRIGHT
byte[] encrypt(byte[] aInput)
aInput
- byte array to be encryptedbyte[] decrypt(byte[] aInput)
aInput
- byte array to be decryptedjavax.crypto.CipherInputStream getInputStream(java.io.InputStream aInput)
aInput
- InputStream to be wrapped with the cipherjavax.crypto.CipherOutputStream getOutputStream(java.io.OutputStream aInput)
aInput
- OutputStream to be wrapped with the cipherboolean needsIV()
If no initialization vector was provided in the constructor, check this value after obtaining a PRCipher instance. If true, call generateIV() and use that value into obtain a new PRCipher instance.
true
if an initialization vector is required
by the algorithm and none was supplied to the constructor.byte[] generateKey()
byte[] generateIV()
Copyright © 2018 Pegasystems Inc. All Rights Reserved.