public class BasicEncryption extends Object implements Encryption
| Constructor and Description |
|---|
BasicEncryption(Map<String,String> params) |
| Modifier and Type | Method and Description |
|---|---|
static String |
base64Encode(byte[] data)
encode the input data producing a base 64 encoded byte array.
|
static int |
base64Encode(byte[] data,
int off,
int length,
OutputStream out)
encode the input data producing a base 64 output stream.
|
boolean |
checkPassword(String provided,
String real)
Check password.
|
String |
encryptPassword(String password)
Encrypt a password.
|
static String |
hexEncode(byte[] in) |
public String encryptPassword(String password)
EncryptionEncrypt a password.
encryptPassword in interface Encryptionpassword - the password in plain format.public boolean checkPassword(String provided, String real)
EncryptionCheck password.
checkPassword in interface Encryptionprovided - password provided in plain format.real - the encrypted format to compare with.public static String hexEncode(byte[] in)
public static String base64Encode(byte[] data)
public static int base64Encode(byte[] data,
int off,
int length,
OutputStream out)
throws IOException
IOExceptionCopyright © 2007-2014 FuseSource, Corp.. All Rights Reserved.