CryptoConverter
//d1-jpa/io.cybercrypt.d1.jpa.conversion/CryptoConverter
CryptoConverter
[d1-jpa]\ public class CryptoConverter<T, U>
An AttributeConverter implementation that uses a Cryptor to encrypt entity attributes. It first serializes the attribute, encrypts the resulting bytes and encodes the encrypted bytes into the desired object type.
Constructors
| CryptoConverter | [d1-jpa] public voidCryptoConverter(Serializer<T>serializer, Cryptorcryptor, Encoder<U>encoder) Create an instance of the CryptoConverter class. |
Functions
| Name | Summary |
|---|---|
| convertToDatabaseColumn | [d1-jpa] public UconvertToDatabaseColumn(Tattribute) Method used for converting entity attributes from type T to type U, before writing them to the database. |
| convertToEntityAttribute | [d1-jpa] public TconvertToEntityAttribute(UdbData) Method used for converting database objects of type U, back to type T upon reading them. |