|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object core.crypto.Hybrid
public class Hybrid
This class provides easy acces to our hybrid encryption implementations.
Copyright (c) 2006 Sebastian Erdweg Copyright (c) 2006 Dominik Schulz Copyright (c) 2006 Florian Lindner Copyright (c) 2006 Betim Berjani This file is part of FlexiCrypt. FlexiCrypt is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. FlexiCrypt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with FlexiCrypt; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Constructor Summary | |
---|---|
Hybrid()
|
Method Summary | |
---|---|
static void |
decryptBinarySimple(PrivateKey recieversKey,
File ciphertext,
File plaintext)
Decrypts a single File in the simple binary format. |
static void |
decryptXMLZIP(File ciphertext,
File plaintext)
Decrypts a file that was decrypted for some private key in our keystore. |
static void |
decryptXMLZIP(PrivateKey privateKey,
File ciphertext,
File plaintext)
This class is only meant for unit testing!!! |
static void |
encryptBinarySimple(PublicKey recieversKey,
File plaintext,
File ciphertext,
String symmetricAlgorithm,
int symmStrength)
Encrypts a single File for a single reciever in a simple binary format. |
static void |
encryptXMLZIP(X509Certificate[] recieverCerts,
File plaintext,
File ciphertext,
String symmetricAlgorithm,
int symmStrength)
Encrypts a single File for an unlimited* number of recievers. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Hybrid()
Method Detail |
---|
public static void encryptBinarySimple(PublicKey recieversKey, File plaintext, File ciphertext, String symmetricAlgorithm, int symmStrength) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, IOException
recieversKey
- the you wan't to encrypt forplaintext
- the Plaintext, what you want to encryptciphertext
- the Ciphertext, where does the encrypted data go tosymmetricAlgorithm
- the symmetric algorithm, depends on your security providersymmStrength
- the strength of your choosen symmetric algorithmen depends on both your algorithm and your security provider
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
IOException
public static void decryptBinarySimple(PrivateKey recieversKey, File ciphertext, File plaintext) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
recieversKey
- YOUR(?) Private Key to decrypt the symmetric keyciphertext
- where to load the data fromplaintext
- where to write the decrypted data to
IOException
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IllegalBlockSizeException
BadPaddingException
public static void encryptXMLZIP(X509Certificate[] recieverCerts, File plaintext, File ciphertext, String symmetricAlgorithm, int symmStrength) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IOException, ParserConfigurationException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException
recieverCerts
- plaintext
- ciphertext
- symmetricAlgorithm
- symmStrength
-
NoSuchAlgorithmException
NoSuchPaddingException
InvalidKeyException
IOException
ParserConfigurationException
IllegalBlockSizeException
BadPaddingException
- * - some technical restrictions apply.
InvalidAlgorithmParameterException
public static void decryptXMLZIP(File ciphertext, File plaintext) throws Exception
ciphertext
- plaintext
-
Exception
public static void decryptXMLZIP(PrivateKey privateKey, File ciphertext, File plaintext) throws Exception
privateKey
- ciphertext
- plaintext
-
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |