|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eu.miscedautils.CommonUtils.FileEncryption
public class FileEncryption
Utility class for encrypting/decrypting files.
Field Summary | |
---|---|
static int |
AES_Key_Size
|
Constructor Summary | |
---|---|
FileEncryption()
Constructor: creates ciphers |
Method Summary | |
---|---|
void |
decrypt(java.io.File in,
java.io.File out)
Decrypts and then copies the contents of a given file. |
void |
encrypt(java.io.File in,
java.io.File out)
Encrypts and then copies the contents of a given file. |
void |
loadKey(java.io.File in,
java.io.File privateKeyFile)
Decrypts an AES key from a file using an RSA private key |
void |
makeKey()
Creates a new AES key |
void |
saveKey(java.io.File out,
java.io.File publicKeyFile)
Encrypts the AES key to a file using an RSA public key |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int AES_Key_Size
Constructor Detail |
---|
public FileEncryption() throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
Method Detail |
---|
public void makeKey() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public void loadKey(java.io.File in, java.io.File privateKeyFile) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void saveKey(java.io.File out, java.io.File publicKeyFile) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException
public void encrypt(java.io.File in, java.io.File out) throws java.io.IOException, java.security.InvalidKeyException
java.io.IOException
java.security.InvalidKeyException
public void decrypt(java.io.File in, java.io.File out) throws java.io.IOException, java.security.InvalidKeyException
java.io.IOException
java.security.InvalidKeyException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |