Package es.gob.afirma.encryption
Class CipherIntegra
- java.lang.Object
-
- es.gob.afirma.encryption.CipherIntegra
-
- All Implemented Interfaces:
java.io.Serializable
public class CipherIntegra extends java.lang.Object implements java.io.SerializableClass to decode and encode text using different symmetric or asymmetric algorithms.
Project:Library for the integration with the services of @Firma, eVisor and TS@.
- Version:
- 1.0, 26/02/2016.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CipherIntegra(AlgorithmCipherEnum algorithmCipherParam, java.security.Key keyParam)Constructor method for the class Cipher.java.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdecrypt(java.lang.String message)Method for symmetric decryption.java.lang.Stringencrypt(java.lang.String message)Method for symmetric encryption of data.
-
-
-
Constructor Detail
-
CipherIntegra
public CipherIntegra(AlgorithmCipherEnum algorithmCipherParam, java.security.Key keyParam) throws CipherException
Constructor method for the class Cipher.java.- Parameters:
algorithmCipherParam- Parameter that represents the selected cipher algorithm.keyParam- Parameter that represents the used key to encrypt/decrypt a message.- Throws:
CipherException- If the method fails.
-
-
Method Detail
-
encrypt
public final java.lang.String encrypt(java.lang.String message) throws CipherExceptionMethod for symmetric encryption of data.- Parameters:
message- Text to be encoded.- Returns:
- The encoded text.
- Throws:
CipherException- If the method fails.
-
decrypt
public final java.lang.String decrypt(java.lang.String message) throws CipherExceptionMethod for symmetric decryption.- Parameters:
message- Text to be decoded.- Returns:
- Text The encoded text.
- Throws:
CipherException- If the method fails.
-
-