|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.atunes.kernel.utils.CryptoUtils
public class CryptoUtils
Utility methods for encrypting and decrypting
NOTE: This class does not not produce really secret encryptions (the secret key is public)!
.
Constructor Summary | |
---|---|
CryptoUtils()
|
Method Summary | |
---|---|
static byte[] |
decrypt(byte[] bytes)
Decrypts a byte array. |
static byte[] |
encrypt(byte[] bytes)
Encrypts a byte array. |
static void |
main(java.lang.String[] args)
The main method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CryptoUtils()
Method Detail |
---|
public static byte[] decrypt(byte[] bytes) throws java.security.GeneralSecurityException, java.io.IOException
bytes
- The byte array to decrypt
java.security.GeneralSecurityException
- the general security exception
java.io.IOException
- Signals that an I/O exception has occurred.public static byte[] encrypt(byte[] bytes) throws java.security.GeneralSecurityException, java.io.IOException
bytes
- The byte array to encrypt
java.security.GeneralSecurityException
- the general security exception
java.io.IOException
- Signals that an I/O exception has occurred.public static void main(java.lang.String[] args) throws java.lang.Exception
args
- the arguments
java.lang.Exception
- the exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |