Interface ContentEncoder

All Known Implementing Classes:
AesContentEncoder

public interface ContentEncoder
Interface for performing two-way encryption and decryption on objects.
Since:
7.0.1
Author:
Moran Avigdor
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(byte[] bytes)
    Decode the byte array returning a decrypted object.
    byte[]
    Encode the object returning an encrypted byte array.
  • Method Details

    • encode

      byte[] encode(Object obj) throws EncodingException
      Encode the object returning an encrypted byte array.
      Parameters:
      obj - Object to encode.
      Returns:
      a byte array representing the encoded object.
      Throws:
      EncodingException - if failed to encode the object.
    • decode

      Object decode(byte[] bytes) throws EncodingException
      Decode the byte array returning a decrypted object.
      Parameters:
      bytes - a byte array representing the encoded object.
      Returns:
      the decoded object.
      Throws:
      EncodingException - if failed to decode the object.