public class Encryptor
extends java.lang.Object
com.liferay.util.Encryptor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENCODING |
static java.lang.String |
IBM_PROVIDER_CLASS |
static java.lang.String |
KEY_ALGORITHM |
static int |
KEY_SIZE |
static java.lang.String |
PROVIDER_CLASS |
static java.lang.String |
SUN_PROVIDER_CLASS |
Constructor and Description |
---|
Encryptor() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decrypt(java.security.Key key,
java.lang.String encryptedString) |
static byte[] |
decryptUnencodedAsBytes(java.security.Key key,
byte[] encryptedBytes) |
static java.lang.String |
decryptUnencodedAsString(java.security.Key key,
byte[] encryptedBytes) |
static java.security.Key |
deserializeKey(java.lang.String base64String) |
static java.lang.String |
digest(java.lang.String text) |
static java.lang.String |
digest(java.lang.String algorithm,
java.lang.String text) |
static java.lang.String |
encrypt(java.security.Key key,
java.lang.String plainText) |
static byte[] |
encryptUnencoded(java.security.Key key,
byte[] plainBytes) |
static byte[] |
encryptUnencoded(java.security.Key key,
java.lang.String plainText) |
static java.security.Key |
generateKey() |
static java.security.Key |
generateKey(java.lang.String algorithm) |
static java.security.Provider |
getProvider() |
static java.lang.String |
serializeKey(java.security.Key key) |
public static final java.lang.String ENCODING
public static final java.lang.String IBM_PROVIDER_CLASS
public static final java.lang.String KEY_ALGORITHM
public static final int KEY_SIZE
public static final java.lang.String PROVIDER_CLASS
public static final java.lang.String SUN_PROVIDER_CLASS
public static java.lang.String decrypt(java.security.Key key, java.lang.String encryptedString) throws EncryptorException
EncryptorException
public static byte[] decryptUnencodedAsBytes(java.security.Key key, byte[] encryptedBytes) throws EncryptorException
EncryptorException
public static java.lang.String decryptUnencodedAsString(java.security.Key key, byte[] encryptedBytes) throws EncryptorException
EncryptorException
public static java.security.Key deserializeKey(java.lang.String base64String)
public static java.lang.String digest(java.lang.String text)
public static java.lang.String digest(java.lang.String algorithm, java.lang.String text)
public static java.lang.String encrypt(java.security.Key key, java.lang.String plainText) throws EncryptorException
EncryptorException
public static byte[] encryptUnencoded(java.security.Key key, byte[] plainBytes) throws EncryptorException
EncryptorException
public static byte[] encryptUnencoded(java.security.Key key, java.lang.String plainText) throws EncryptorException
EncryptorException
public static java.security.Key generateKey() throws EncryptorException
EncryptorException
public static java.security.Key generateKey(java.lang.String algorithm) throws EncryptorException
EncryptorException
public static java.security.Provider getProvider() throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public static java.lang.String serializeKey(java.security.Key key)