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[] input)
Encode the input data producing a base 64 encoded byte array.
|
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)
EncryptionencryptPassword in interface Encryptionpassword - the password in plain format.public boolean checkPassword(String provided, String real)
EncryptioncheckPassword 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[] input)
input - the String to encore as an array of byte.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.