Interface Encryptor<T,​R>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T decrypt​(R encryptedMessage)
      Decrypt the given encrypted message.
      R encrypt​(T message)
      Encrypt the given message.
      boolean isEncrypted​(T message)
      Check whether the given message is already encrypted or not.
    • Method Detail

      • isEncrypted

        boolean isEncrypted​(T message)
        Check whether the given message is already encrypted or not.
        Parameters:
        message - the message to check
        Returns:
        true if encrypted
      • encrypt

        R encrypt​(T message)
        Encrypt the given message.
        Parameters:
        message - the message to encrypt
        Returns:
        encrypted message
      • decrypt

        T decrypt​(R encryptedMessage)
        Decrypt the given encrypted message.
        Parameters:
        encryptedMessage - the encrypted message to decrypt
        Returns:
        decrypted message