Class CipherIntegra

  • All Implemented Interfaces:
    java.io.Serializable

    public class CipherIntegra
    extends java.lang.Object
    implements java.io.Serializable

    Class 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.String decrypt​(java.lang.String message)
      Method for symmetric decryption.
      java.lang.String encrypt​(java.lang.String message)
      Method for symmetric encryption of data.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 CipherException
        Method 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 CipherException
        Method for symmetric decryption.
        Parameters:
        message - Text to be decoded.
        Returns:
        Text The encoded text.
        Throws:
        CipherException - If the method fails.