Package com.soffid.iam.api
Class Password
- java.lang.Object
-
- com.soffid.iam.api.Password
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Password
public class Password extends Object implements Serializable
Clase que permite serializar de forma segura una contraseña. Utiliza un algoritmo de encriptación bidireccional- Version:
- $Revision: 1.1.2.1 $
- Author:
- $Author: u07286 $
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Password
decode(String s)
Des-serializarstatic char[]
fromBase64(String source)
Genera un array de caracteres a partir de su codificación base 64static Password
fromString(String s)
String
getHash()
String
getPassword()
Obtener la contraseña sin cifrarstatic void
main(String[] args)
static String
toBase64(byte[] source)
Transforms to base 64static Password
toPassword(Password password2)
String
toString()
Serializar
-
-
-
Field Detail
-
password
protected String password
Contraseña almacenada en formato cifrado
-
-
Constructor Detail
-
Password
public Password()
Constructor
-
Password
public Password(String s)
Constructor a partir de la contraseña en claro- Parameters:
s
- contraseña en claro
-
-
Method Detail
-
toString
public String toString()
Serializar
-
decode
public static Password decode(String s)
Des-serializar- Parameters:
s
- encrypted password- Returns:
- Password object holding the encrypted password
-
toBase64
public static String toBase64(byte[] source)
Transforms to base 64- Parameters:
source
- data to transform- Returns:
- bas64 string
-
fromBase64
public static char[] fromBase64(String source)
Genera un array de caracteres a partir de su codificación base 64
-
getPassword
public String getPassword()
Obtener la contraseña sin cifrar- Returns:
- contraseña en claro
-
main
public static void main(String[] args) throws NoSuchAlgorithmException, UnsupportedEncodingException
-
getHash
public String getHash()
-
-