public class EncryptUtil extends Object
| Constructor and Description |
|---|
EncryptUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decrypt(String key,
String source)
Decodes a base-64 encoded string using the key with the DES/ECB/PKCS5Padding
cipher.
|
static String |
encrypt(String key,
String source)
Uses the key to encrypt the source string into a base-64
encoded string using a DES/ECB/PKCS5Padding cipher.
|
static String |
generateKey() |
public static String generateKey()
public static String encrypt(String key, String source)
key - The key to use for encryption. Must be at least 8 characters
in length.source - The plain-text to encrypt.public static String decrypt(String key, String source)
key - The key to use for encryption. Must be at least 8 characters
in length.source - The Base-64 encoded encypted string.Copyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.