org.kuali.common.util.enc
Class EncUtils
java.lang.Object
org.kuali.common.util.enc.EncUtils
public class EncUtils
- extends Object
Method Summary |
static EncryptionContext |
getEncryptionContext(EnvironmentService env)
|
static EncryptionContext |
getEncryptionContext(Properties properties)
|
protected static com.jcraft.jsch.KeyPair |
getKeyPair(com.jcraft.jsch.JSch jsch,
int type,
int size)
|
static KeyPair |
getKeyPair(String name,
int size,
Algorithm algorithm)
|
protected static String |
getPrivateKey(com.jcraft.jsch.KeyPair keyPair)
|
protected static String |
getPublicKey(com.jcraft.jsch.KeyPair keyPair,
String name)
|
protected static EncStrength |
getStrength(EnvironmentService env,
EncryptionContext provided)
|
protected static EncStrength |
getStrength(Properties properties,
EncryptionContext provided)
|
static org.jasypt.util.text.TextEncryptor |
getTextEncryptor(String password)
Returns a BasicTextEncryptor that uses password to encrypt/decrypt. |
static org.jasypt.util.text.TextEncryptor |
getTextEncryptor(String password,
EncStrength strength)
Return a BasicTextEncryptor or StrongTextEncryptor depending on what strength is set to |
static boolean |
isEncrypted(String text)
Return true if the text is enclosed with ENC() |
protected static boolean |
isPasswordRequired(EnvironmentService env,
EncryptionContext provided)
|
protected static boolean |
isPasswordRequired(Properties properties,
EncryptionContext provided)
|
protected static String |
toStringUTF8(ByteArrayOutputStream out)
|
static String |
unwrap(String wrappedText)
|
static String |
wrap(String unwrappedText)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncUtils
public EncUtils()
getKeyPair
public static KeyPair getKeyPair(String name,
int size,
Algorithm algorithm)
getKeyPair
protected static com.jcraft.jsch.KeyPair getKeyPair(com.jcraft.jsch.JSch jsch,
int type,
int size)
getPrivateKey
protected static String getPrivateKey(com.jcraft.jsch.KeyPair keyPair)
getPublicKey
protected static String getPublicKey(com.jcraft.jsch.KeyPair keyPair,
String name)
toStringUTF8
protected static String toStringUTF8(ByteArrayOutputStream out)
getEncryptionContext
public static EncryptionContext getEncryptionContext(Properties properties)
getEncryptionContext
public static EncryptionContext getEncryptionContext(EnvironmentService env)
isPasswordRequired
protected static boolean isPasswordRequired(Properties properties,
EncryptionContext provided)
isPasswordRequired
protected static boolean isPasswordRequired(EnvironmentService env,
EncryptionContext provided)
getStrength
protected static EncStrength getStrength(Properties properties,
EncryptionContext provided)
getStrength
protected static EncStrength getStrength(EnvironmentService env,
EncryptionContext provided)
isEncrypted
public static boolean isEncrypted(String text)
- Return true if the text is enclosed with
ENC()
unwrap
public static String unwrap(String wrappedText)
wrap
public static String wrap(String unwrappedText)
getTextEncryptor
public static org.jasypt.util.text.TextEncryptor getTextEncryptor(String password)
- Returns a
BasicTextEncryptor
that uses password
to encrypt/decrypt.
getTextEncryptor
public static org.jasypt.util.text.TextEncryptor getTextEncryptor(String password,
EncStrength strength)
- Return a
BasicTextEncryptor
or StrongTextEncryptor
depending on what strength
is set to
Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.