|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jaspersoft.jasperserver.api.metadata.common.service.impl.Cipherer
public class Cipherer
This class provides the utilities of a cryptographic cipher for encryption and decryption.
| Constructor Summary | |
|---|---|
Cipherer()
|
|
| Method Summary | |
|---|---|
byte[] |
decode(byte[] content)
Decodes the given content |
java.lang.String |
decode(java.lang.String content)
Dehexifies and decodes the given content * @param content string to be decoded |
java.lang.String |
decode(java.lang.String content,
java.lang.Object booleanValue)
Decodes the given content if the booleanValue is "true" (case insensitive). |
static byte[] |
dehexify(java.lang.String data)
Convert a hex string response to a byte array |
byte[] |
encode(byte[] content)
Encodes the given content |
java.lang.String |
encode(java.lang.String content)
Encodes and hexifies the given content |
static java.lang.String |
hexify(byte[] data)
Convert a byte array response to a hex string |
void |
init()
Initializes the encoder and decoder. |
void |
init(java.lang.String inCipherTransformation,
java.lang.String inKeyAlgorithm,
java.lang.String inKeyBytes,
boolean isPlainText)
Initializes the encoder and decoder with the given parameters |
static void |
main(java.lang.String[] args)
Utility API for password encryption/decryption. |
void |
setCipherTransformation(java.lang.String cipherTransformation)
|
void |
setKeyAlgorithm(java.lang.String keyAlgorithm)
|
void |
setKeyBytes(java.lang.String inKeyBytes,
boolean isPlainText)
|
static void |
test(java.lang.String[] args)
For testing purposes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cipherer()
| Method Detail |
|---|
public void init(java.lang.String inCipherTransformation,
java.lang.String inKeyAlgorithm,
java.lang.String inKeyBytes,
boolean isPlainText)
cipherTransformation - keyAlgorithm - keyBytes - isPlainText - public void init()
public java.lang.String encode(java.lang.String content)
public byte[] encode(byte[] content)
public java.lang.String decode(java.lang.String content)
public byte[] decode(byte[] content)
public java.lang.String decode(java.lang.String content,
java.lang.Object booleanValue)
content - string to be decodedbooleanValue - specifies whether content needs to be decoded
public static java.lang.String hexify(byte[] data)
public static byte[] dehexify(java.lang.String data)
public void setKeyBytes(java.lang.String inKeyBytes,
boolean isPlainText)
key_bytes - The KEY_BYTES to set.isPlainText - Whether key_bytes is plain text or a represantation of byte sequencepublic void setCipherTransformation(java.lang.String cipherTransformation)
cipherTransformation - The cipherTransformation to set.public void setKeyAlgorithm(java.lang.String keyAlgorithm)
keyAlgorithm - The keyAlgorithm to set.public static void test(java.lang.String[] args)
args - public static void main(java.lang.String[] args)
args -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||