public final class AOCipherConfig
extends java.lang.Object
Constructor and Description |
---|
AOCipherConfig(CipherConstants.AOCipherAlgorithm algo,
CipherConstants.AOCipherBlockMode mode,
CipherConstants.AOCipherPadding padd)
Construyye una configuración de cifrado.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
CipherConstants.AOCipherAlgorithm |
getAlgorithm()
Obtiene el algoritmo de cifrado.
|
CipherConstants.AOCipherBlockMode |
getBlockMode()
Obtiene el modo de bloque (block mode) de cifrado.
|
CipherConstants.AOCipherPadding |
getPadding()
Obtiene el relleno (padding) del cifrado.
|
int |
hashCode() |
static AOCipherConfig |
parse(java.lang.String cipherConfig)
Genera un objeto AOCipherConfig a partir de una cadena que siga uno de
los siguientes patrones:
Algoritmo/ModoBloque/Padding
Algoritmo
Si sólo se especifica el algoritmo de cifrado, se tomara
el modo y el padding configurados por defecto para ese algoritmo.
|
void |
setAlgorithm(CipherConstants.AOCipherAlgorithm algo)
Establece el algoritmo de cifrado.
|
void |
setBlockMode(CipherConstants.AOCipherBlockMode mode)
Establece el modo de bloque para el cifrado.
|
void |
setPadding(CipherConstants.AOCipherPadding padding)
Establece el padding para el cifrado.
|
java.lang.String |
toString() |
public AOCipherConfig(CipherConstants.AOCipherAlgorithm algo, CipherConstants.AOCipherBlockMode mode, CipherConstants.AOCipherPadding padd)
algo
- Algoritmo de cifradomode
- Modo de bloque para el cifradopadd
- Relleno (padding) del cifradopublic static AOCipherConfig parse(java.lang.String cipherConfig) throws java.security.NoSuchAlgorithmException
cipherConfig
- Configuración de cifrado.java.security.NoSuchAlgorithmException
- Cuando el algoritmo no está soportado.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public CipherConstants.AOCipherAlgorithm getAlgorithm()
public CipherConstants.AOCipherBlockMode getBlockMode()
public CipherConstants.AOCipherPadding getPadding()
public void setAlgorithm(CipherConstants.AOCipherAlgorithm algo)
algo
- Algoritmo.public void setBlockMode(CipherConstants.AOCipherBlockMode mode)
mode
- Modo de bloque.public void setPadding(CipherConstants.AOCipherPadding padding)
padding
- Padding.