org.eclipse.net4j.util.security
Class SecurityUtil

java.lang.Object
  extended by org.eclipse.net4j.util.security.SecurityUtil

public final class SecurityUtil
extends Object


Field Summary
static int DEFAULT_ITERATION_COUNT
           
static byte[] DEFAULT_SALT
           
static String PBE_WITH_MD5_AND_DES
           
 
Method Summary
static byte[] encrypt(byte[] data, char[] password, String algorithmName, byte[] salt, int count)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PBE_WITH_MD5_AND_DES

public static final String PBE_WITH_MD5_AND_DES
See Also:
Constant Field Values

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:
Constant Field Values
Method Detail

encrypt

public static byte[] encrypt(byte[] data,
                             char[] password,
                             String algorithmName,
                             byte[] salt,
                             int count)
                      throws NoSuchAlgorithmException,
                             InvalidKeySpecException,
                             NoSuchPaddingException,
                             InvalidKeyException,
                             InvalidAlgorithmParameterException,
                             IllegalBlockSizeException,
                             BadPaddingException
Throws:
NoSuchAlgorithmException
InvalidKeySpecException
NoSuchPaddingException
InvalidKeyException
InvalidAlgorithmParameterException
IllegalBlockSizeException
BadPaddingException
Since:
2.0


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.