public class PIISecurity
extends java.lang.Object
| Constructor and Description | 
|---|
PIISecurity()  | 
| Modifier and Type | Method and Description | 
|---|---|
static java.lang.String | 
decrypt(java.lang.String ciphertext, char[] password, java.lang.String pbkdfAlgo, java.lang.String pbkdfSalt, int pbkdfIteration, int keySize, java.lang.String encAlg)
Converts cipher text string to plain text using password based key derivation function (PBKDF2). 
 | 
static java.lang.String | 
decrypt(java.lang.String ciphertext, javax.crypto.SecretKey key, java.lang.String encAlg)
Converts cipher text string to plain text using key derived from password based key derivation function (PBKDF2). 
 | 
static java.lang.String | 
encrypt(java.lang.String plaintext, char[] password, java.lang.String pbkdfAlgo, java.lang.String pbkdfSalt, int pbkdfIteration, int keySize, java.lang.String encAlg)
Converts plain text string to cipher text using password based key derivation function (PBKDF2). 
 | 
static java.lang.String | 
encrypt(java.lang.String plaintext, javax.crypto.SecretKey key, java.lang.String encAlg)
Converts plain text string to cipher text using key derived from password based key derivation function (PBKDF2). 
 | 
public static java.lang.String encrypt(java.lang.String plaintext,
                       char[] password,
                       java.lang.String pbkdfAlgo,
                       java.lang.String pbkdfSalt,
                       int pbkdfIteration,
                       int keySize,
                       java.lang.String encAlg)
plaintext - text to encryptpassword - password for key derivationpbkdfAlgo - key derivation algorithm which should be PBKDF2pbkdfSalt - non-null and non-empty salt for key derivationpbkdfIteration - iteration count for key derivationkeySize - size of key for key derivationencAlg - data encryption algorithm. it should be in the form: "algorithm/mode/padding" for ex. AES/CBC/PKCS5Padding
public static java.lang.String encrypt(java.lang.String plaintext,
                       javax.crypto.SecretKey key,
                       java.lang.String encAlg)
plaintext - text to encryptkey - password based key derived using PBKDF2encAlg - data encryption algorithm. it should be in the form: "algorithm/mode/padding" for ex. AES/CBC/PKCS5Padding
public static java.lang.String decrypt(java.lang.String ciphertext,
                       char[] password,
                       java.lang.String pbkdfAlgo,
                       java.lang.String pbkdfSalt,
                       int pbkdfIteration,
                       int keySize,
                       java.lang.String encAlg)
ciphertext - text to decryptpassword - password for key derivationpbkdfAlgo - key derivation algorithm which should be PBKDF2pbkdfSalt - non-null and non-empty salt for key derivationpbkdfIteration - iteration count for key derivationkeySize - size of key for key derivationencAlg - data encryption algorithm. it should be in the form: "algorithm/mode/padding" for ex. AES/CBC/PKCS5Padding
public static java.lang.String decrypt(java.lang.String ciphertext,
                       javax.crypto.SecretKey key,
                       java.lang.String encAlg)
ciphertext - text to decryptkey - password based key derived from PBKDF2encAlg - data encryption algorithm. it should be in the form: "algorithm/mode/padding" for ex. AES/CBC/PKCS5Padding