|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jcetaglib.jsp20.ELFunctions
JSP 2.0 EL (Expression Language) based JCE functions
Constructor Summary | |
ELFunctions()
|
Method Summary | |
static java.lang.String |
decrypt(java.lang.String ciphertext,
java.lang.String keyfile,
java.lang.String passphrase,
java.lang.String algorithm,
java.lang.String mode,
java.lang.String padding)
Decrypts a ciphered BASE64 string with a symmetric key |
static java.lang.String |
digest(java.lang.String text,
java.lang.String algorithm)
Creates a digest from a string |
static java.lang.String |
encrypt(java.lang.String text,
java.lang.String keyfile,
java.lang.String passphrase,
java.lang.String algorithm,
java.lang.String mode,
java.lang.String padding)
Encrypts a string with a symmetric key and returns the ciphered text in BASE64 format. |
static java.lang.String |
formdigest(java.lang.String text,
java.lang.String digest,
java.lang.String keyfile,
java.lang.String passphrase,
java.lang.String algorithm)
Creates a form digest from a parameter string |
static java.lang.String |
mac(java.lang.String text,
java.lang.String keyfile,
java.lang.String passphrase,
java.lang.String algorithm,
java.lang.String macname)
Create a MAC from a string |
static java.lang.String |
pbedecrypt(java.lang.String ciphertext,
java.lang.String passphrase,
java.lang.String algorithm)
Decrypts a ciphered BASE64 string with PBE |
static java.lang.String |
pbeencrypt(java.lang.String text,
java.lang.String passphrase,
java.lang.String algorithm)
Encrypts a string with PBE and returns the ciphered text in BASE64 format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ELFunctions()
Method Detail |
public static java.lang.String digest(java.lang.String text, java.lang.String algorithm) throws CryptoException
text
- creates the digest from this textalgorithm
- the digest algorithm. 'SHA-1' if null
CryptoException
- for all encryption errorspublic static java.lang.String formdigest(java.lang.String text, java.lang.String digest, java.lang.String keyfile, java.lang.String passphrase, java.lang.String algorithm) throws CryptoException, java.io.IOException
text
- create the form digest from this parameter stringdigest
- the digest algorithm. 'SHA-1' if nullkeyfile
- the symmetric key filepassphrase
- the symmetric key file passphrasealgorithm
- the symmetric key algorithm
CryptoException
- for all encryption errors
java.io.IOException
- I/O errorspublic static java.lang.String pbeencrypt(java.lang.String text, java.lang.String passphrase, java.lang.String algorithm) throws CryptoException
text
- the plain textpassphrase
- the password or passphrasealgorithm
- the PBE algorithm. "PBEWithSHAAndIDEA-CBC" if null
CryptoException
- for all encryption errorspublic static java.lang.String pbedecrypt(java.lang.String ciphertext, java.lang.String passphrase, java.lang.String algorithm) throws CryptoException
ciphertext
- the text to decipherpassphrase
- password or passphrasealgorithm
- the PBE algorithm. "PBEWithSHAAndIDEA-CBC" if null
CryptoException
- for all encryption errorspublic static java.lang.String encrypt(java.lang.String text, java.lang.String keyfile, java.lang.String passphrase, java.lang.String algorithm, java.lang.String mode, java.lang.String padding) throws CryptoException, KeystoreException
text
- the string to encryptkeyfile
- the symmetric key filepassphrase
- symmetric key file passphrasealgorithm
- symmetric key file algorithm. AES if nullmode
- encryption mode. CBC if nullpadding
- encryption padding. PKCS7Padding if null
CryptoException
- encryption errors
KeystoreException
- keystore errorspublic static java.lang.String decrypt(java.lang.String ciphertext, java.lang.String keyfile, java.lang.String passphrase, java.lang.String algorithm, java.lang.String mode, java.lang.String padding) throws CryptoException, KeystoreException
ciphertext
- the ciphered BASE64 stringkeyfile
- the symmetric key filepassphrase
- symmetric key file passphrasealgorithm
- symmetric key file algorithm. AES if nullmode
- encryption mode. CBC if nullpadding
- encryption padding. PKCS7Padding if null
CryptoException
- encryption errors
KeystoreException
- keystore errorspublic static java.lang.String mac(java.lang.String text, java.lang.String keyfile, java.lang.String passphrase, java.lang.String algorithm, java.lang.String macname) throws CryptoException
text
- the text stringkeyfile
- the symmetric key file locationpassphrase
- the symmetric key file passphrasealgorithm
- the symmetric key file algorithmmacname
- MAC algorithm. "HMac-SHA512" if null
CryptoException
- MAC errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |