|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jcetaglib.lib.PBECrypt
PBE (Password-based) encryption & decryption routines for use with BouncyCastle JCE provider
Constructor Summary | |
PBECrypt()
|
Method Summary | |
static void |
decrypt(java.io.InputStream is,
java.io.DataOutputStream daos,
java.lang.StringBuffer passphrase,
java.lang.String algorithm,
int bufferlength)
Decrypts any inputstream with PBE |
static java.lang.StringBuffer |
decrypt(java.lang.StringBuffer text,
java.lang.StringBuffer passphrase,
java.lang.String algorithm)
Decrypts a ciphertext with PBE |
static void |
decryptFile(java.lang.String file,
java.lang.String newfile,
java.lang.StringBuffer passphrase,
java.lang.String algorithm)
Decrypts a ciphered file with PBE |
static void |
encrypt(java.io.InputStream is,
java.io.DataOutputStream daos,
byte[] seed,
java.lang.StringBuffer passphrase,
java.lang.String algorithm,
int bufferlength)
Encrypts any inputstream with PBE (password-based encryption) |
static java.lang.StringBuffer |
encrypt(java.lang.StringBuffer text,
java.lang.StringBuffer passphrase,
byte[] seed,
java.lang.String algorithm)
Encrypts a string with PBE and returns the ciphered text in BASE64 format. |
static java.lang.StringBuffer |
encrypt(java.lang.StringBuffer text,
java.lang.StringBuffer passphrase,
java.lang.String algorithm)
Encrypts a string with PBE and returns the ciphered text in BASE64 format. |
static void |
encryptFile(java.lang.String file,
java.lang.String newfile,
java.lang.StringBuffer passphrase,
byte[] seed,
java.lang.String algorithm)
Encrypts a file with PBE and creates a new file with the result. |
static void |
encryptFile(java.lang.String file,
java.lang.String newfile,
java.lang.StringBuffer passphrase,
java.lang.String algorithm)
Encrypts a file with PBE and creates a new file with the result. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PBECrypt()
Method Detail |
public static java.lang.StringBuffer encrypt(java.lang.StringBuffer text, java.lang.StringBuffer passphrase, java.lang.String algorithm) throws CryptoException
text
- the text to encryptpassphrase
- password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
CryptoException
- for all encryption errorspublic static java.lang.StringBuffer encrypt(java.lang.StringBuffer text, java.lang.StringBuffer passphrase, byte[] seed, java.lang.String algorithm) throws CryptoException
text
- the text to encryptpassphrase
- password or passphraseseed
- the seed for SecureRandomalgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
CryptoException
- for all encryption errorspublic static void encrypt(java.io.InputStream is, java.io.DataOutputStream daos, byte[] seed, java.lang.StringBuffer passphrase, java.lang.String algorithm, int bufferlength) throws CryptoException, java.io.IOException
is
- any inputstreamdaos
- ciphered outputstreamseed
- seed for SecureRandom (optional)passphrase
- the password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")bufferlength
- buffer length in bytes
CryptoException
- for all errors
java.io.IOException
public static void encryptFile(java.lang.String file, java.lang.String newfile, java.lang.StringBuffer passphrase, java.lang.String algorithm) throws CryptoException, java.io.IOException
file
- the file to encryptpassphrase
- password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
java.io.IOException
- I/O errors
CryptoException
- for all encryption errorspublic static void encryptFile(java.lang.String file, java.lang.String newfile, java.lang.StringBuffer passphrase, byte[] seed, java.lang.String algorithm) throws CryptoException, java.io.IOException
file
- the file to encryptnewfile
- the encrypted filepassphrase
- password or passphraseseed
- the seed for SecureRandomalgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
java.io.IOException
- I/O errors
CryptoException
- for all encryption errorspublic static java.lang.StringBuffer decrypt(java.lang.StringBuffer text, java.lang.StringBuffer passphrase, java.lang.String algorithm) throws CryptoException
text
- the ciphertextpassphrase
- password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
CryptoException
- for all encryption errorspublic static void decrypt(java.io.InputStream is, java.io.DataOutputStream daos, java.lang.StringBuffer passphrase, java.lang.String algorithm, int bufferlength) throws CryptoException, java.io.IOException
is
- the ciphered inputstreamdaos
- deciphered outputstreampassphrase
- password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")bufferlength
- buffer length in bytes
CryptoException
- encryption errors
java.io.IOException
- I/O errorspublic static void decryptFile(java.lang.String file, java.lang.String newfile, java.lang.StringBuffer passphrase, java.lang.String algorithm) throws CryptoException, java.io.IOException
file
- the file to decryptpassphrase
- the password or passphrasealgorithm
- encryption algorithm (e.g. "PBEWithSHAAndIDEA-CBC")
CryptoException
- for all encryption errors
java.io.IOException
- I/O errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |