public class EncryptionUtils
extends java.lang.Object
| Constructor and Description |
|---|
EncryptionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static AES |
aes(javax.crypto.spec.IvParameterSpec initialVector,
javax.crypto.SecretKey secretKey) |
static AES |
aes(javax.crypto.SecretKey secretKey) |
static Base64 |
base64() |
static int |
complementaryOffset(int offset) |
static javax.crypto.SecretKey |
fromIterationCount(int n) |
static javax.crypto.SecretKey |
fromString(java.lang.String key) |
static javax.crypto.SecretKey |
fromString(java.lang.String key,
byte[] salt) |
static javax.crypto.SecretKey |
fromString(java.lang.String key,
byte[] salt,
int iterationCount) |
static javax.crypto.SecretKey |
fromString(java.lang.String key,
byte[] salt,
int iterationCount,
int keyLength) |
static javax.crypto.spec.IvParameterSpec |
generateIv() |
static Rot13 |
rot13(int offset) |
public static Base64 base64()
public static AES aes(javax.crypto.SecretKey secretKey)
public static AES aes(javax.crypto.spec.IvParameterSpec initialVector, javax.crypto.SecretKey secretKey)
public static Rot13 rot13(int offset)
public static int complementaryOffset(int offset)
offset - The offset.public static javax.crypto.spec.IvParameterSpec generateIv()
public static javax.crypto.SecretKey fromIterationCount(int n)
throws java.security.NoSuchAlgorithmException
n - The iteration count.java.security.NoSuchAlgorithmExceptionpublic static javax.crypto.SecretKey fromString(java.lang.String key)
throws java.security.spec.InvalidKeySpecException
key - The key as string.java.security.spec.InvalidKeySpecException - If the key is invalid.public static javax.crypto.SecretKey fromString(java.lang.String key,
byte[] salt)
throws java.security.spec.InvalidKeySpecException
key - The key as string.salt - The salt.java.security.spec.InvalidKeySpecException - If the key is invalid.public static javax.crypto.SecretKey fromString(java.lang.String key,
byte[] salt,
int iterationCount)
throws java.security.spec.InvalidKeySpecException
key - The key as string.salt - The salt.iterationCount - The iteration count.java.security.spec.InvalidKeySpecException - If the key is invalid.public static javax.crypto.SecretKey fromString(java.lang.String key,
byte[] salt,
int iterationCount,
int keyLength)
throws java.security.spec.InvalidKeySpecException
key - The key as string.salt - The salt.iterationCount - The iteration count.keyLength - The key length.java.security.spec.InvalidKeySpecException - If the key is invalid.