public interface CryptoHelper
Modifier and Type | Interface and Description |
---|---|
static class |
CryptoHelper.ALGORITHM |
Modifier and Type | Method and Description |
---|---|
byte[] |
digest(CryptoHelper.ALGORITHM algorithm,
byte[] data)
Realiza una huella digital de los datos proporcionados.
|
java.security.cert.X509Certificate |
generateCertificate(byte[] encode)
Genera un certificado del tipo indicado a partir de su
codificación.
|
byte[] |
generateRandomBytes(int numBytes)
Genera un aleatorio contenido en un array de bytes.
|
byte[] |
rsaDecrypt(byte[] cipheredData,
java.security.interfaces.RSAKey key)
Desencripta datos mediante RSA.
|
byte[] |
rsaEncrypt(byte[] data,
java.security.interfaces.RSAKey key)
Encripta datos mediante RSA.
|
byte[] digest(CryptoHelper.ALGORITHM algorithm, byte[] data)
algorithm
- Algoritmo de huella digital que debe utilizarsedata
- Datos de entradajava.io.IOException
- Si ocurre algún problema generando la huella
digitalbyte[] rsaDecrypt(byte[] cipheredData, java.security.interfaces.RSAKey key) throws java.io.IOException
cipheredData
- Datos a desencriptarkey
- Clava RSA de descifradojava.io.IOException
- Si ocurre algún problema durante el
desencriptadobyte[] rsaEncrypt(byte[] data, java.security.interfaces.RSAKey key) throws java.io.IOException
data
- Datos a encriptarkey
- Clava RSA de cifradojava.io.IOException
- Si ocurre algún problema durante el
encriptadojava.security.cert.X509Certificate generateCertificate(byte[] encode) throws java.security.cert.CertificateException
encode
- Codificación del certificadojava.security.cert.CertificateException
- Si ocurre algún problema durante la
generaciónbyte[] generateRandomBytes(int numBytes) throws java.io.IOException
numBytes
- Número de bytes aleatorios que generarjava.io.IOException
- Si ocurre algún problema durante la
generación
del aleatorio