Package org.eclipse.net4j.util.security
Class SecurityUtil
java.lang.Object
org.eclipse.net4j.util.security.SecurityUtil
- Author:
- Eike Stepper
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Deprecated.As of 3.3.static byte[]
static byte[]
pbeDecrypt
(byte[] data, char[] password, String algorithmName, byte[] salt, int count) static byte[]
pbeEncrypt
(byte[] data, char[] password, String algorithmName, byte[] salt, int count) static void
setAuthorizationContext
(Map<String, Object> authorizationContext) static char[]
toCharArray
(String str) static String
toString
(char[] chars) static void
withAuthorizationContext
(Map<String, Object> authorizationContext, Runnable runnable)
-
Field Details
-
PBE_WITH_MD5_AND_DES
- See Also:
-
DEFAULT_SALT
public static final byte[] DEFAULT_SALT- Since:
- 2.0
-
DEFAULT_ITERATION_COUNT
public static final int DEFAULT_ITERATION_COUNT- Since:
- 2.0
- See Also:
-
-
Method Details
-
pbe
public static byte[] pbe(byte[] data, char[] password, String algorithmName, byte[] salt, int count, int mode) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException -
pbeDecrypt
public static byte[] pbeDecrypt(byte[] data, char[] password, String algorithmName, byte[] salt, int count) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException -
pbeEncrypt
public static byte[] pbeEncrypt(byte[] data, char[] password, String algorithmName, byte[] salt, int count) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException -
toString
- Since:
- 3.14
-
toCharArray
- Since:
- 3.14
-
getAuthorizationContext
- Since:
- 3.23
-
setAuthorizationContext
- Since:
- 3.23
-
withAuthorizationContext
public static void withAuthorizationContext(Map<String, Object> authorizationContext, Runnable runnable) - Since:
- 3.23
-
encrypt
@Deprecated public static byte[] encrypt(byte[] data, char[] password, String algorithmName, byte[] salt, int count) throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException Deprecated.As of 3.3. usepbeEncrypt(byte[], char[], String, byte[], int)
.
-