Interface SecretKeyRepository

All Known Implementing Classes:
SecretKeyRepositoryImpl

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

    Modifier and Type
    Method
    Description
    getKey(String name, boolean create)
    Returns the secret key for the specified key name
    void
    saveKey(String name, SecretKey key)
    Saves the secret key in the repository, with the specified name
  • Method Details

    • 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