Interface SecretKeyRepository

  • All Known Implementing Classes:
    SecretKeyRepositoryImpl

    public interface SecretKeyRepository
    Repository for storing/retrieving encryption keys.
    Author:
    avasquez
    • Method Detail

      • getKey

        SecretKey getKey​(String name,
                         boolean create)
                  throws CryptoException
        Returns the secret key for the specified key name
        Parameters:
        name - the key's name in the repository
        create - true to create new key if there's no key with the specified name in the repository.
        Returns:
        the key
        Throws:
        CryptoException
      • saveKey

        void saveKey​(String name,
                     SecretKey key)
              throws CryptoException
        Saves the secret key in the repository, with the specified name
        Parameters:
        name - the key's name in the repository
        key - the key to save
        Throws:
        CryptoException