Class BasicEncryption
- java.lang.Object
-
- org.apache.karaf.jaas.modules.encryption.BasicEncryption
-
- All Implemented Interfaces:
Encryption
public class BasicEncryption extends Object implements Encryption
-
-
Constructor Summary
Constructors Constructor Description BasicEncryption(Map<String,String> params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Stringbase64Encode(byte[] input)Encode the input data producing a base 64 encoded byte array.booleancheckPassword(String provided, String real)Check password.StringencryptPassword(String password)Encrypt a password.static StringhexEncode(byte[] in)
-
-
-
Method Detail
-
encryptPassword
public String encryptPassword(String password)
Description copied from interface:EncryptionEncrypt a password.- Specified by:
encryptPasswordin interfaceEncryption- Parameters:
password- the password in plain format.- Returns:
- the encrypted password format.
-
checkPassword
public boolean checkPassword(String provided, String real)
Description copied from interface:EncryptionCheck password.- Specified by:
checkPasswordin interfaceEncryption- Parameters:
provided- password provided in plain format.real- the encrypted format to compare with.- Returns:
- true if the password match, false else.
-
hexEncode
public static String hexEncode(byte[] in)
-
base64Encode
public static String base64Encode(byte[] input)
Encode the input data producing a base 64 encoded byte array.- Parameters:
input- the String to encore as an array of byte.- Returns:
- a byte array containing the base 64 encoded data.
-
-