Module crypt.api

Interface Encryptor<T,R>

Type Parameters:
T - the generic type of the input to encrypt
R - the generic type of the result
All Known Subinterfaces:
ByteArrayEncryptor, FileEncryptor, GenericObjectEncryptor<T>, IntegerEncryptor, StringEncryptor

public interface Encryptor<T,R>
The generic functional interface Encryptor can encrypt an object of type <T> and return the encrypted result as object of type <R>.
  • Method Summary

    Modifier and Type
    Method
    Description
    encrypt(T toEncrypt)
    Encrypt the given object.
  • Method Details

    • encrypt

      R encrypt(T toEncrypt) throws Exception
      Encrypt the given object.
      Parameters:
      toEncrypt - The object to encrypt.
      Returns:
      The encrypted object.
      Throws:
      Exception - is thrown if encryption fails.