Package org.eclipse.net4j.util.security
Class SecurityUtil
- java.lang.Object
- 
- org.eclipse.net4j.util.security.SecurityUtil
 
- 
 public final class SecurityUtil extends java.lang.Object- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_ITERATION_COUNTstatic byte[]DEFAULT_SALTstatic java.lang.StringPBE_WITH_MD5_AND_DES
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static byte[]encrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count)Deprecated.As of 3.3.static byte[]pbe(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count, int mode)static byte[]pbeDecrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count)static byte[]pbeEncrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count)static char[]toCharArray(java.lang.String str)static java.lang.StringtoString(char[] chars)
 
- 
- 
- 
Field Detail- 
PBE_WITH_MD5_AND_DESpublic static final java.lang.String PBE_WITH_MD5_AND_DES - See Also:
- Constant Field Values
 
 - 
DEFAULT_SALTpublic static final byte[] DEFAULT_SALT - Since:
- 2.0
 
 - 
DEFAULT_ITERATION_COUNTpublic static final int DEFAULT_ITERATION_COUNT - Since:
- 2.0
- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
pbepublic static byte[] pbe(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count, int mode) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException- Throws:
- java.security.NoSuchAlgorithmException
- java.security.spec.InvalidKeySpecException
- javax.crypto.NoSuchPaddingException
- java.security.InvalidKeyException
- java.security.InvalidAlgorithmParameterException
- javax.crypto.IllegalBlockSizeException
- javax.crypto.BadPaddingException
- Since:
- 3.13
 
 - 
pbeDecryptpublic static byte[] pbeDecrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException- Throws:
- java.security.NoSuchAlgorithmException
- java.security.spec.InvalidKeySpecException
- javax.crypto.NoSuchPaddingException
- java.security.InvalidKeyException
- java.security.InvalidAlgorithmParameterException
- javax.crypto.IllegalBlockSizeException
- javax.crypto.BadPaddingException
- Since:
- 3.13
 
 - 
pbeEncryptpublic static byte[] pbeEncrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException- Throws:
- java.security.NoSuchAlgorithmException
- java.security.spec.InvalidKeySpecException
- javax.crypto.NoSuchPaddingException
- java.security.InvalidKeyException
- java.security.InvalidAlgorithmParameterException
- javax.crypto.IllegalBlockSizeException
- javax.crypto.BadPaddingException
- Since:
- 3.13
 
 - 
encrypt@Deprecated public static byte[] encrypt(byte[] data, char[] password, java.lang.String algorithmName, byte[] salt, int count) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, javax.crypto.NoSuchPaddingException, java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingExceptionDeprecated.As of 3.3. usepbeEncrypt(byte[], char[], String, byte[], int).- Throws:
- java.security.NoSuchAlgorithmException
- java.security.spec.InvalidKeySpecException
- javax.crypto.NoSuchPaddingException
- java.security.InvalidKeyException
- java.security.InvalidAlgorithmParameterException
- javax.crypto.IllegalBlockSizeException
- javax.crypto.BadPaddingException
- Since:
- 2.0
 
 - 
toStringpublic static java.lang.String toString(char[] chars) - Since:
- 3.14
 
 - 
toCharArraypublic static char[] toCharArray(java.lang.String str) - Since:
- 3.14
 
 
- 
 
-