Interface KeyEntity

  • All Known Implementing Classes:
    DefaultKeyEntity

    public interface KeyEntity
    Interface to describe a key entity managed by the JpaCryptoEngine. The module provides a default implementation DefaultKeyEntity, but this is specified as an interface so applications may easily use a different implementation, with their own JPA annotations.

    Implementations are required to have a zero-arg constructor (which is generally required for JPA entities). The JpaCryptoEngine will create new instances by invoking this constructor and then invoking the setters.

    • Method Detail

      • getKeyId

        String getKeyId()
        Read accessor to the keyId. This is the primary key of the entity.
        Returns:
        the current value
      • setKeyId

        void setKeyId​(String keyId)
        Write accessor to the keyId. This is the primary key of the entity.
        Parameters:
        keyId - the new value
      • getSecretKeyBase64

        String getSecretKeyBase64()
        Read accessor to secretKeyBase64. This is a representation of the secret key bytes in Base64-form.
        Returns:
        the current value
      • setSecretKeyBase64

        void setSecretKeyBase64​(String secretKeyBase64)
        Write accessor to secretKeyBase64. This is a representation of the secret key bytes in Base64-form.
        Parameters:
        secretKeyBase64 - the new value