public class Encryptors
extends java.lang.Object
BytesEncryptor and TextEncryptor implementations.| Modifier and Type | Method and Description |
|---|---|
static TextEncryptor |
delux(java.lang.CharSequence password,
java.lang.CharSequence salt)
Creates a text encryptor that uses "stronger" password-based encryption.
|
static TextEncryptor |
noOpText()
Creates a text encryptor that performs no encryption.
|
static TextEncryptor |
queryableText(java.lang.CharSequence password,
java.lang.CharSequence salt)
Deprecated.
This encryptor is not secure. Instead, look to your data store for a
mechanism to query encrypted data.
|
static BytesEncryptor |
standard(java.lang.CharSequence password,
java.lang.CharSequence salt)
Creates a standard password-based bytes encryptor using 256 bit AES encryption.
|
static BytesEncryptor |
stronger(java.lang.CharSequence password,
java.lang.CharSequence salt)
Creates a standard password-based bytes encryptor using 256 bit AES encryption with
Galois Counter Mode (GCM).
|
static TextEncryptor |
text(java.lang.CharSequence password,
java.lang.CharSequence salt)
Creates a text encryptor that uses "standard" password-based encryption.
|
public static BytesEncryptor stronger(java.lang.CharSequence password, java.lang.CharSequence salt)
password - the password used to generate the encryptor's secret key; should
not be sharedsalt - a hex-encoded, random, site-global salt value to use to generate the
keypublic static BytesEncryptor standard(java.lang.CharSequence password, java.lang.CharSequence salt)
stronger(CharSequence, CharSequence).password - the password used to generate the encryptor's secret key; should
not be sharedsalt - a hex-encoded, random, site-global salt value to use to generate the
key#stronger(CharSequence, CharSequence), which uses the significatly more secure
GCM (instead of CBC)public static TextEncryptor delux(java.lang.CharSequence password, java.lang.CharSequence salt)
password - the password used to generate the encryptor's secret key; should
not be sharedstronger(CharSequence, CharSequence)public static TextEncryptor text(java.lang.CharSequence password, java.lang.CharSequence salt)
password - the password used to generate the encryptor's secret key; should
not be sharedstandard(CharSequence, CharSequence)@Deprecated public static TextEncryptor queryableText(java.lang.CharSequence password, java.lang.CharSequence salt)
password - the password used to generate the encryptor's secret key; should
not be sharedsalt - a hex-encoded, random, site-global salt value to use to generate the
secret keypublic static TextEncryptor noOpText()